Closed Bug 1487465 Opened 6 years ago Closed 6 years ago

LastPass causes 6s hang in content

Categories

(WebExtensions :: Developer Outreach, defect, P5)

defect

Tracking

(Performance Impact:medium)

VERIFIED FIXED
Performance Impact medium

People

(Reporter: Harald, Unassigned)

References

(Depends on 2 open bugs)

Details

(Keywords: perf:responsiveness, Whiteboard: triaged)

Attachments

(1 file)

STR: - Install LastPass extension (and log in) - Open https://dxr.mozilla.org/mozilla-central/search?q=actor%20perf - Click on a folder (like `/ lib /` in the first result) ER: Menu opens instantly AR: Menu opens after 6 second hang Profile: https://perfht.ml/2oomMEz High level analysis: - mouseup event triggers `L</LPSiteNotification` (which seems to be called twice) - `getText` (which is called by `getUsername`) calls `Symbol.split` many times (see Stack Chart) - `Symbol.split` does regexp work and substr matching
This is an issue in the lastpass extension.
Component: General → Add-ons
Product: WebExtensions → Tech Evangelism
Harald, can you check whether this is faster in Chrome? LastPass should presumably be hitting the same code path there. If they have a faster implementation of String.prototype.split on regex, there's a Spidermonkey bug here, otherwise it's really just something for LastPass to fix.
Flags: needinfo?(hkirschner)
(In reply to Markus Stange [:mstange] from comment #2) > If they have a faster > implementation of String.prototype.split on regex, there's a Spidermonkey > bug here, Which might be bug 1437914.
Attached file trace_dxr-lastpass.json.gz (deleted) —
Chrome with LastPass no significant delay. Attached a Chrome trace recorded for LastPass on DXR, using the "rendering & input latency" preset.
Flags: needinfo?(hkirschner)
Whiteboard: [qf] → [qf:p1:f67]
(In reply to Markus Stange [:mstange] from comment #3) > might be bug 1437914. (In reply to :Harald Kirschner :digitarald from comment #4) > Chrome with LastPass no significant delay. (OK -- then this isn't bug 1437914, since that one is equivalently bad between Firefox & Chrome, aside from the fact that Chrome runs the regex less often in the original testcase there.

What would be lovely here is to reproduce this, and then use the Add-on Debugging tools to find what the slow regular expression operation is.

Whiteboard: [qf:p1:f67] → [qf:p2:responsiveness]

cc'ing Matthew Miller, since Lockbox might care about this class of bug.

Component: Add-ons → General
Product: Tech Evangelism → WebExtensions

(In reply to Daniel Holbert [:dholbert] from comment #5)

(In reply to Markus Stange [:mstange] from comment #3)

might be bug 1437914.
(In reply to :Harald Kirschner :digitarald from comment #4)
Chrome with LastPass no significant delay.

(OK -- then this isn't bug 1437914, since that one is equivalently bad
between Firefox & Chrome, aside from the fact that Chrome runs the regex
less often in the original testcase there.

So.... did we determine that this is a bug in Spidermonkey or just something for LastPass?

Flags: needinfo?(mstange)

The fact that it's slow in Firefox and fast in Chrome suggest that it is a Spidermonkey bug. That's about all we know at the moment.

Flags: needinfo?(mstange)
Depends on: 613498

Based on #c9, I'm going to move this to reflect that it's not about the extensions framework; but it's unclear if this is entirely on us or something in LastPass is exacerbating something. I'll contact LastPass about this and bug 1486303.

Component: General → XPConnect
Product: WebExtensions → Core

Harald, can we get some more data on this?

  • Can you still reproduce?
  • Firefox version?
  • OS?
  • LastPass version?
Flags: needinfo?(hkirschner)

Now its an 800ms hang on a high-end MBP: https://perfht.ml/2SO0RDq

Nightly 67.0a1 (2019-03-08) (64-bit), OSX

LastPass 4.35.0.4

Flags: needinfo?(hkirschner)

Hi Harald, I'm an engineer on LastPass at LogMeIn. I think I've fixed the issue, and I'm seeing roughly a 5x improvement in performance on that specific page. Would you please email me at mark.nakib@logmein.com so I can provide you a developer build to test the fix?

Thank you Mark! Email sent.

Component: XPConnect → Developer Outreach
Product: Core → WebExtensions

Closing this per #c13.

Status: NEW → RESOLVED
Closed: 6 years ago
Priority: -- → P5
Resolution: --- → FIXED
Whiteboard: [qf:p2:responsiveness] → [qf:p2:responsiveness] triaged

Tested Mark's build and saw the click overhead go down from 973ms to 42ms 🎉.

Status: RESOLVED → VERIFIED
Performance Impact: --- → P2
Whiteboard: [qf:p2:responsiveness] triaged → triaged
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: