Closed Bug 1643797 Opened 4 years ago Closed 3 years ago

Browser Console slows down main thread with `getRepeatId`

Categories

(DevTools :: Console, defect, P2)

defect

Tracking

(firefox99 fixed)

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: Harald, Assigned: nchevobbe)

References

(Blocks 2 open bugs)

Details

(Whiteboard: dt-console-perf-2022)

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1643796 +++

I had Browser Console and Google Docs became extremely sluggish.

https://share.firefox.dev/2XFXeoV

getRepeatId is 20% of the sample, just generating keys using JSON.

Blocks: 1606740
No longer depends on: 1643796
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

Getting rid of the repeatId property and turning it into a function for checking if 2 messages are similar, instead of stringifying an object as we do now.
From profiling, this seems to reduce time spent for this in comparison to getRepeatId, but it doesn't really shows in DAMP: https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=64beeeccfb8900057dbd2d8ba35596451340ab8b&newProject=try&newRevision=747060063e6d8c4a25dad7d28cf83ea3a0661bf0&framework=12&page=1

Adding 10 000 messages, 5 times (so a total of 50 000 messages), to try to get some median number.

with my patch: https://share.firefox.dev/34BpyOP
without: https://share.firefox.dev/3sklM4E

so that's a 25% improvement, nice but not great

Whiteboard: dt-console-perf-2022

(In reply to Nicolas Chevobbe [:nchevobbe] from comment #2)

Adding 10 000 messages, 5 times (so a total of 50 000 messages), to try to get some median number.

with my patch: https://share.firefox.dev/34BpyOP
without: https://share.firefox.dev/3sklM4E

so that's a 25% improvement, nice but not great

So, I think my earliest patch wasn't optimal and was calling areMessagesSimilar too much.
In a new version of the patch, I'm seeing 10x better performance. I'll push that to review soon

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/31af70aae2fa [devtools] Improve Console message repeat performance. r=dthayer.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: