Closed Bug 1770961 Opened 2 years ago Closed 2 years ago

EmptyLines's disableEmptyLines method is still called too many times

Categories

(DevTools :: Debugger, enhancement)

enhancement

Tracking

(firefox102 fixed)

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Bug 1769795 wasn't enough, disableEmptyLines is still called many times. Less, but still too many times with a real life firefox profile.

What happens is that props.breakableLines ends up being a new empty Set instance, or, the same Set again and again.
That's because the selectors around breakableLines return a new array everytime they get called for non-original sources...
https://searchfox.org/mozilla-central/rev/1c391443f770eddc7cde9e52dba5ef50cc233c06/devtools/client/debugger/src/selectors/source-actors.js#96-105

breakableLines wasn't correctly memoized for sources other than the original ones.
This patch at least fix this for regular JS files sources, but the issue still
happens for HTML sources having more than one source actor.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f8b40333a280 [devtools] Fix breakableLines selectors to be correctly memoized. r=bomsy
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: