mirror of
https://github.com/zotero/zotero.git
synced 2026-09-19 00:01:31 +00:00
Improves EPUB close performance.
By wrapping with requestIdleCallback(), we ensure:
1. remove() won't be called right away, so the DOM elements being removed
won't be visible and won't trigger a relayout.
2. remove() won't be called while there are pending UI events, so it
shouldn't cause the UI to hang/lag/stutter.
Combined, these two improvements make the UI hang when closing a large EPUB
mostly imperceptible on my machine.
Addresses #3321; doesn't completely fix it because there's likely more to be
done on the reader side to optimize the DOM.
|
||
|---|---|---|
| .. | ||
| content | ||
| locale | ||
| skin/default | ||