Closed Bug 1851566 Opened 1 year ago Closed 1 year ago

Stop exporting large data set from the parser worker for inline previews

Categories

(DevTools :: Debugger, task)

task

Tracking

(firefox119 fixed)

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Based on bug 1843454 comment 1 investigations, we are currently sending very large arrays from the parser worker thread to the main thread.
The largest arrays are actually only used by inline preview to implement findBestMatchExpression:
https://searchfox.org/mozilla-central/rev/a7e33b7f61e7729e2b1051d2a7a27799f11a5de6/devtools/client/debugger/src/utils/ast.js#5-28
Instead, we could keep the data stored within the worker thread and lazily call a method on-demand in the worker thread.
We would still have to parse the whole file and still craft these large arrays, but drastically reduce GC overhead and CPU consumption solely related to data passing between threads.

These three attributes are very large arrays and we could easily keep them
within the worker thread by exposing new dedicated method.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2ea4fd5d517a [devtools] Avoid passing large dataset out of the parser worker. r=devtools-reviewers,bomsy
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Regressions: 1855685
Blocks: 1851522
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: