You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a gallery with 1000 items. I noticed that the web page is getting less and less responsive (it takes seconds!) after a few page views. (on every page view I need to do a .refresh() of the gallery, since the list of photo's will be changed.
I tracked this down to a problem in lgQuery.prototype.off().
Current code is
Also I was wondering if this should be a double keyed object. First key is the namespace, 2nd key is the eventname.
Like lgQuery.eventListeners[ns_part][name_part].
This prevents the double loop and in case of 1000 gallery items, it saves a million calls to isEventMatched()!
Steps to reproduce
Simply put 1000 items in the gallery and call lg.refresh() a few times.
Description
I have a gallery with 1000 items. I noticed that the web page is getting less and less responsive (it takes seconds!) after a few page views. (on every page view I need to do a .refresh() of the gallery, since the list of photo's will be changed.
I tracked this down to a problem in lgQuery.prototype.off().
Current code is
I think this should be:
Also I was wondering if this should be a double keyed object. First key is the namespace, 2nd key is the eventname.
Like lgQuery.eventListeners[ns_part][name_part].
This prevents the double loop and in case of 1000 gallery items, it saves a million calls to isEventMatched()!
Steps to reproduce
Simply put 1000 items in the gallery and call lg.refresh() a few times.
JS code that you use to initialize lightGallery.
Sample HTML markup
Environment
Additional context
The text was updated successfully, but these errors were encountered: