Closed Bug 1745639 Opened 2 years ago Closed 8 months ago

Firefox(v 95) is hanging/slowing down immensely while using compute engine instances in GCP on my Mac pro(M1 pro)

Categories

(Core :: JavaScript Engine, defect, P3)

Firefox 95
defect

Tracking

()

RESOLVED INCOMPLETE
Performance Impact medium

People

(Reporter: ayushguha.off16007, Unassigned)

References

Details

(Keywords: perf:responsiveness)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:95.0) Gecko/20100101 Firefox/95.0

Steps to reproduce:

I have the up-to-date version of firefox for my new Mac pro with M1 pro SOC. The reason I believe this is a firefox related bug is because safari/brave on my same mac doesn't face this issue.
I have tried looking for a fix but my issue wasn't listed on the net and I don't use any firefox profile and have checked my settings for any anomalies which weren't found.

SETUP :-
I have a Macbook pro (M1 pro) with Monterey 12.0. My firefox version is 95.

STEPS to reproduce:-

  1. Login to GCP console and navigate to compute engine > Virtual machines > VM instances.
  2. without even interacting or booting up any VMs, the page starts lagging immensely and hangs after sometime.

Actual results:

I get a prompt showing "firefox is slowing down. To speed it up stop this page". In the activity monitor, it shows the firefox tab connected to GCP console is using 100-110% CPU while on safari it uses 11-18% and even less on brave. I then have to close the tab and slowly it returns to normal.

Expected results:

I should be able to interact with the VMs in GCP and other compute engine instances without any hiccups. I need to interact with them daily and hence I need to find a fix soon.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Cocoa' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Widget: Cocoa
Product: Firefox → Core

If you could share a profile using https://profiler.firefox.com/ when the problem happens that would be great.

Moving for now until we have a profile to narrow this down further.

Component: Widget: Cocoa → Performance

(In reply to Timothy Nikkel (:tnikkel) from comment #2)

If you could share a profile using https://profiler.firefox.com/ when the problem happens that would be great.

Hey timothy,

I am sharing the permalink to my profile. I started recording after I opened gcp dashboard and then I navigated to compute engine instances and tried interacting with a VM or any other thing on the page, all while recording, but it wouldn't respond. I then closed the tab and stopped recording. I have used the web dev preset. I hope that's all right? And yeah I left out the screenshots from the profiles for privacy matters.

Here's the link

Do lemme know if you need something else.

Can you record a profile using the graphics preset please? The web developer preset tells us what the website is doing, but doesn't give us insight into what Firefox is doing.

(In reply to Timothy Nikkel (:tnikkel) from comment #5)

Can you record a profile using the graphics preset please? The web developer preset tells us what the website is doing, but doesn't give us insight into what Firefox is doing.

Sure. Here you go --> https://share.firefox.dev/3dUa8Xx

Tell me if something's missing.

(In reply to Timothy Nikkel (:tnikkel) from comment #5)

Can you record a profile using the graphics preset please? The web developer preset tells us what the website is doing, but doesn't give us insight into what Firefox is doing.

Hey, any updates?? Thanks!

Jandem, this is all about JS. Can you see anything obvious?

Denis, could you compare to Chrome.

Component: Performance → JavaScript Engine
Flags: needinfo?(jdemooij)
Flags: needinfo?(dpalmeiro)
Whiteboard: [qf:p2:responsiveness]
Whiteboard: [qf:p2:responsiveness] → [qf:p1:responsiveness]
Whiteboard: [qf:p1:responsiveness] → [qf:p2:responsiveness]

Looks like we're slow in some Angular code. We spend most of our time under Fga in the profile, which I believe I've worked out is refreshView.

A full 10% of the ticks are in what looks like an IC for Ida, which I think is updateTransplantedViewCount. Not sure what's up there.

(In reply to Iain Ireland [:iain] from comment #9)

Looks like we're slow in some Angular code. We spend most of our time under Fga in the profile, which I believe I've worked out is refreshView.

A full 10% of the ticks are in what looks like an IC for Ida, which I think is updateTransplantedViewCount. Not sure what's up there.

Looking at the code, i wonder if there's a null or undefined operand here: lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount and/or parent[TRANSPLANTED_VIEWS_TO_REFRESH] += amount. I added some logging and we do hit null/undefined for binary arithmetic ops a fair number of times on some Angular websites so I'll just post a patch for that in a separate bug and we can see if it helps here.

Depends on: 1752281
Flags: needinfo?(dpalmeiro)

This might be better now on Nightly after bug 1752281 has landed.

Flags: needinfo?(jdemooij)

Would you be able to re-check this on nightly now Ayush?

Flags: needinfo?(ayushguha.off16007)
Severity: -- → S3
Priority: -- → P3
Performance Impact: --- → P2
Whiteboard: [qf:p2:responsiveness]

A needinfo is requested from the reporter, however, the reporter is inactive on Bugzilla. Closing the bug as incomplete.

For more information, please visit BugBot documentation.

Status: UNCONFIRMED → RESOLVED
Closed: 8 months ago
Flags: needinfo?(ayushguha.off16007)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.