Closed Bug 1312228 Opened 9 years ago Closed 8 years ago

High CPU usage on translation view

Categories

(Webtools Graveyard :: Pontoon, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: theo, Unassigned)

Details

Attachments

(2 files)

STR: - Open the translation view for any string, for instance https://pontoon.mozilla.org/fr/engagement/snippets/2016/nov2016.lang/?string=159173 - Keep the focus on this tab (i.e. do not switch tab) and do nothing in particular on the page - Wait for a minute or two Actual results: My MBP fan is going crazy and my battery is drained much faster than usual. If I switch tab or close the tab, everything goes back to normal. Could it be an infinite loop in a script or similar? Happy to help if you can’t reproduce or need data from a profiler, etc. It’s not a recent regression, already noticed in the past.
I'm unable to reproduce this locally or on production instance. Could you provide some more data, e.g. the CPU usage chart and profiler data? Does it also happen on other views, like /teams?
I've identified a possible candidate for this issue: loading animations in History, Machinery, and Locales tabs persist even when tab contents finishes loading. Loading animations are implemented using CSS animations via Font Awesome. We should either use display:none instead of visibility:hidden and/or add/remove the fa-spin class as it's needed. I'll dig into it and test if it affects the profile chart.
Priority: -- → P3
I've deployed the animations fix on stage. Théo, could you please check it out, e.g. here? https://mozilla-pontoon-staging.herokuapp.com/sl/engagement/snippets/2014/apr2014.lang/?string=143644
Flags: needinfo?(theo)
:mathjazz I've noticed this issue a while ago but for some reason I didn't mark this as the major bottle-neck on slower systems. Your patch definetely helps because I don't see any unecessary css-related activities. But I can't estimate if that will be enough in Theo's case.
(In reply to Matjaz Horvat [:mathjazz] from comment #5) > I've deployed the animations fix on stage. > > Théo, could you please check it out, e.g. here? > https://mozilla-pontoon-staging.herokuapp.com/sl/engagement/snippets/2014/ > apr2014.lang/?string=143644 It seem to fix the issue \o/ When I open prod and click on a bunch of strings to trigger the animation, laptop is heating. Then I open a new tab with staging, do the same, and a couple minutes after that, laptop cools down and fan stops.
Flags: needinfo?(theo)
Commit pushed to master at https://github.com/mozilla/pontoon https://github.com/mozilla/pontoon/commit/a39fd3d2077b2449c7f9e0687767c271d1682994 Fix bug 1312228: Stop tab loading animations when not needed Also prevents high CPU usage
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: