-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
RxDB with lokijs works bad in Safari and FF when using multiple tabs #3666
Comments
I tried this in Firefox 96. It think this happens because of the |
@swnf this makes sense. |
Well it does certainly make sense to ensure an async method never completes in sync (just google "releasing Zalgo"). However, this pattern came from the callback era. If I understand the MDN article correctly, the |
Trying to fix this by not longer using setTimeout in the LokiJS RxStorage internals. |
FIX #3666 do not use setTimeout in LokiJS RxStorage internals
Merged this now. Please test again on the next release. |
@pubkey Thanks for fixing. Issue in firefox is resolved! It's still slow in Safari though (up to 100-200ms). But I think the problem is different and likely related to broadcast channel, because if I set |
@11bit you should not enfore localstorage type because then it will not use the native BroadcastChannel if available. Instead you should enforce
|
RxDB with LokiJS adapter seems to be not working well in FF and Safari in non-leader tab when multiple tabs are opened.
Firefox v97
When I open two tabs, changes in the first tab happen very quickly however in the second tab it takes 500-1000ms to propogate. This is most likely due to cpu throttliing for the background tab (which happens to be a leader) because if i open two windows side by side, then everything works very quickly
Safari Version 15.2
In the first tab everything works ok. In the second tab after a couple of changes, change listener starts firing infinitely
Repo with bug reproduction
Demo https://peaceful-haibt-3425a9.netlify.app
The text was updated successfully, but these errors were encountered: