Profiling the Top Sites code reveals that although the query we're making for the top sites data is ~400ms (see https://bugzilla.mozilla.org/show_bug.cgi?id=1211984), the work we do on the main thread for layout is also quite long (~200 ms). There seems to be two factors in the sluggishness of the UI: 1. Applying the blur on the favicon image on the main thread takes ~50ms. 2. SnapKit constraint setup and subview complexity a significant amount of time as well. Some solutions: 1. Only calculate blurred version of favicon once and cache... We already cache favicons so it shouldn't be too bad, we would just need to add more invalidation logic 2. Simplify the views for the thumbnail cell as much as we can. I'm not sure if it's just that SnapKit is slow or auto layout but some investigation into this is needed.
Summary: Optimize Top Site Thumbnail cells to be more performant → Optimize Top Site Thumbnail cell layout and configuration to be more performant
Created attachment 8682102 [details] aauws9o9QZogrrzCV68lX3ih4ROi39G5rTO7qDClbPw.png Profile w/o cache optimization
Moved the blurring story into it's own bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1221118
tracking-fxios: ? → 2.0+
Whiteboard: [good second bug][lang=swift]
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.