Open Bug 1874656 Opened 10 months ago Updated 10 months ago

Migrate from the parser worker `findBestMatchExpression` to `getExpressionFromCoords` for matching expressions

Categories

(DevTools :: Debugger, enhancement)

enhancement

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: bomsy, Assigned: bomsy)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

To find the matching expression for a token position the preview uses findBestMatchExpression on the parserWorker https://searchfox.org/mozilla-central/rev/f465027ef4d334dbc9ad270718c8a5e8045e7a2b/devtools/client/debugger/src/actions/preview.js#29-32.

It falls back to getExpressionFromCoords https://searchfox.org/mozilla-central/rev/f465027ef4d334dbc9ad270718c8a5e8045e7a2b/devtools/client/debugger/src/actions/preview.js#36 which uses the codemirror api to match the expressions.

Did a quick patch to use getExpressionFromCoords by default and is looking good.

Lets try to move away from using parserWorker.findBestMatchExpression to getExpressionFromCoords and should give some performance wins.

Assignee: nobody → hmanilla
Attachment #9372794 - Attachment description: WIP: Bug 1874656 - [devtools] Test using getExpressionFromCoords by default → Bug 1874656 - [devtools] Move from using parserWorker.findBestMatchExpression to getExpressionFromCoords r=#devtools-reviewers
Status: NEW → ASSIGNED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: