Major font animation FPS drop on some platforms
Reported by
philipp....@gmail.com,
Mar 19 2018
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.33 Safari/537.36 Steps to reproduce the problem: 1. Open the attached test case or go to https://codepen.io/skefr/pen/KoNbQx What is the expected behavior? There should be no slowdown on any platform. It should behave just like in Mozilla Firefox. What went wrong? For the first few seconds there is severe slowdown on some platforms like Linux and not on others like Windows. The slowdown might or might not go away after some time. It seems to me like it does not go away when the tab is kept is in the background or if the tab is opened in incognito mode, not sure about that, maybe it's also just random. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 66.0.3359.33 Channel: beta OS Version: Flash Version: I came across this while attempting to create a non-JS testcase for bug 781344, but unlike that bug this here seems to be very platform specific and it behaves differently so I am assuming that it has a different root cause. No such slowdown happens in Mozilla Firefox.
,
Mar 19 2018
Modified test case with the scaling happening on <text> rather than <g> where the slowdown does not appear to happen at all: https://codepen.io/skefr/pen/MVbxaJ (also attached)
,
Mar 19 2018
,
Mar 20 2018
Attached screenshot showing profiling result. Observe how the FPS gradually improve until after 2 minutes when the issue is finally gone.
,
Mar 21 2018
Thanks for filing the issue! Able to reproduce the issue on reported chrome version 66.0.3359.33, latest beta 66.0.3359.45 , latest stable 65.0.3325.181 and latest Dev 67.0.3371.0 using Ubuntu 14.04. Note: Issue is not seen on Mac 10.13.1 and Windows 10. As the issue is seen from M60(60.0.3112.78) considering it as Non-Regression and marking it as Untriaged. Note: Tentatively adding component "Blink>Fonts", Please feel free to change if this doesn't suite.
,
Mar 21 2018
Thanks for the detailed report and test case. That is *a lot* of font families listed. Loading fonts is platform specific and generally requires IPC, the way this is written it requires trying to load over 200 fonts for each frame. This isn't really a use case worth optimizing for as it is very unlikely to have any effect outside of test cases and micro benchmarks like this.
,
Mar 21 2018
> "the way this is written it requires trying to load over 200 fonts for each frame." I don't understand why it would require reloading these fonts for every frame in the first place. The font used does not change and the kerning info should be cached. > "unlikely to have any effect outside of test cases" Maybe, but very similar bug 781344 (which shows on every platform though) is a real effect which I saw in one of my projects when switching from Bootstrap 3 to Bootstrap 4 and where more entries were added to font-families.
,
Mar 21 2018
In other words, maybe fixes towards this here would also help with the negative effect of many font-families seen in bug 781344 which represents a non-artificial problem. (On a side note, I really wonder why the effect only appears when doing the transform on <g> [1st test case] but not with <text> [2nd test case], is there already some optimization in place?) |
||||
►
Sign in to add a comment |
||||
Comment 1 by philipp....@gmail.com
, Mar 19 2018