-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Optimizations issues #82
Comments
I still need to do more test to make sure that creating lots of DOM elements is a problem. Problem could be somewhere else of course. p.s. confirmed. Adding lots of created sliders into DOM take most JS processing time. |
Another improvement idea: don't do anything if there are 0 targets to show modal window from. |
Issue was with creating multiple empty iframes on page load. Even src is empty, this process is very slow. I fixed it by creating iframes only when user clicks on target element (only when needed.) |
This lib will builds huge list of
tobi__slider
elements on page load. During this time, JS blocks everything else like user input, page rendering and so on.And now google penalize sites for being slow. So this should be fixed.
What can be done? On load create only basic DOM elements, like container, buttons. Only when user does click, do heavy work to display something using lightbox effect.
The text was updated successfully, but these errors were encountered: