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
Hello, I was looking to using this package in an effort to replace Dexie with a smaller package. When I profiling idb against Dexie and other options, I noticed that it adds way more event listeners than expected.
Are you seeing some kind of leak here? The 'upgradeneeded' event in particular is only added once per database connection, so I don't see how there'd be any kind of real world difference between a listener and a handler here.
I use listeners rather than handlers so they're not overwritten if people get the unwrapped values and override the handlers.
Hello, I was looking to using this package in an effort to replace Dexie with a smaller package. When I profiling idb against Dexie and other options, I noticed that it adds way more event listeners than expected.
I made a simple setup here: https://github.com/fadi-george/idb-test
I noticed that with idb, I see a lot of listeners being added.
And it can be up to 2x the number of listeners compared to Dexie.
Basic IndexDB for comparison:
Which brings me to my point where I copied over the idb src files and changed the event listeners to event handlers. Things like:
being changed into
And then saw an obvious reduction in the listener count.
So maybe it would be good to switch all the event listeners to event handlers.
The text was updated successfully, but these errors were encountered: