javascript performance issues in active tab
Categories
(Core :: Performance: General, defect)
Tracking
()
People
(Reporter: bret.towe, Unassigned)
References
Details
Attachments
(1 file)
|
243.21 KB,
application/json
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0
Steps to reproduce:
goto https://frzyc.github.io/genshin-optimizer/ switch to settings tab and upload the attached json file then switch to builds tab choose rosaria and select generate
Actual results:
I found that if i watch it run builds it takes 1m44s but if i switch to another tab while it runs it only takes 22s
also seem to have an issue on some builds that the initial run time is say 30s but if ran again with no changes it will then take double the time on successive runs
switching tabs tho goes back to sub 30s run as long as focus isn't on that tab
Expected results:
take 22s watching it or not
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Performance' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
I should note the issue was being seen on version 8.1.5 of the optimizer, its acting better now as of 8.1.8
so spooling up a local copy of it at that version might be required to see the bug
its source can be found here: https://github.com/frzyc/genshin-optimizer
Comment 3•4 years ago
|
||
Could you create a performance profile for this using https://profiler.firefox.com/
There is an upload button in the profiler.
https://share.firefox.dev/39qrWdL
do I need to run the profiler with the tab in the background also or is just having 1 long run good enough?
Comment 5•4 years ago
|
||
Having a separate profile from background, if that makes it fast, would be good.
Based on the profile I'm not surprised the page might be faster in background. It uses postMessage for scheduling, I think, but triggers also
RefreshDriver for some animations and also setInterval. RefreshDriver and setInterval are heavily throttled for pages in background, so there is way less work to do when the page is in background.
https://share.firefox.dev/37VWkMY
here is switching to another tab during run
the UI side of updating, the only things changing are a progress bar and some numbers (timer, builds processed) nothing that I would expect such a drastic impact to performance
and while I couldn't show it in a profile since my npm setup decided to break itself already for some reason
I'm pretty sure it was this simple commit https://github.com/frzyc/genshin-optimizer/commit/7cdda21665ad3eb7b3dcefd2f8b16f9299af462b
that fixed the speed issue.
hopefully everything i provided can help narrow down the problem so other sites don't happen across this bug.
Comment 7•3 years ago
|
||
Looks like the performance issue is gone and based on Olli's comment in comment 5, it was expected. So I am closing this bug. Please feel free to reopen it if you think there are more underlying issues. Thanks!
Description
•