-
-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Documentation] Icon page and search extremely slow and laggy in Safari browsers - improvement possible? #1122
Comments
Hmm, I'm not seeing a lag except a slight delay while the sprite loads (and the sprite was added to avoid thousands of HTTP requests for icons). Is there any chance you can help me find the culprit? If anyone else can replicate this, I'm open to a PR. However, I really want to keep the icon search since a lot of people seem to use it. |
An online Lighthouse Tests seems to confirm my observations, even on the Chrome Mobile browser: |
These are already deferred, though. Not sure how to "fix" it without gaming Lighthouse, which also won't solve the problem. Any suggestions? |
I had some time to look into this again today, and found some hints – but unsure how to interprete these results or if this points into the right/a helpful direction. Used the Safari 16.3 built-in Timeline recording on a fresh, uncached page load of shoelace.style/components/icon. Page load over 2.13 Gigabyte (!) of data?(also refer to below "sprite.svg") sprite.svg
Styles Recalculation
|
Okay yeah, that does no longer skyrocket the Network requests and resources loaded ^^ I think I spotted the culprit (see below): for me it seems to be caused by the Here are the most interesting results I spotted when Caching is ENabled: appendChild connectedCallback()(from Styles Recalculated (8.01 s)(Layout & Rendering) |
I'm not sure why Safari had so much trouble with this page, but perhaps dumping 1,000+ tooltips into the DOM on page load isn't a good idea. 😅 Fixed in af70d88 by lazily appending tooltips on mouseover. The result should be invisible to the user and is definitely more performant in Safari. You can preview it here: https://next.shoelace.style/components/icon |
Awesome! 👏 |
The SL Icon doc page is extremely laggy to the point, that the search is almost non responsive / hard to use, on Safari Webbrowsers - particularly macOS Ventura and iOS (16).
Is it possible to somewhat improve this doc's page, to make it more snappy again? In 2.0.0-beta70+ it used to be much faster, but a short load time lag was already present. Alas not as bad as since 2.0.0-beta87 incl. beta88.
The text was updated successfully, but these errors were encountered: