Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1665455 - Animate the Skeleton UI r=agashlin
For a better user experience during slow startups (and to match the design by Markus Jaritz), we want to animate the placeholder elements (the grey rectangles which hold the place of text and icons) with a light moving gradient. A question may arise regarding whether the performance cost of running this animation is worth the improved user experience. My claim is yes, hinging mostly on the observation that the performance cost is small. On my machine, one frame of the animation takes at most 0.15ms, and runs every 16.15ms. This means we eat less than 1% CPU time on one core of the system. It should also be noted that this animation runs primarily during the window wherein we are prefetching dlls, AKA while we are blocked on IO and the CPU is more likely to be idle. On slower systems, one frame may take longer - however, on slower systems we should also be blocked *more* by IO, making the trade favorable. For further anecdotal evidence of this being okay, when I run this on slow reference hardware shortly after OS startup, I do not see any dropped frames, indicating that this has very little trouble completing, and is thus quite cheap. Regarding testing, I will invoke the same logic as for the rest of the skeleton UI patches - it would involve quite a bit of work to test this in automation given our existing frameworks. It may be worth it at some point, but certainly not while this is a feature that we are just experimenting with and which is not enabled by default. Differential Revision: https://phabricator.services.mozilla.com/D91453
- Loading branch information