Closed Bug 1523943 Opened 5 years ago Closed 5 years ago

Cache SourceActor.url

Categories

(DevTools :: Debugger, enhancement, P2)

enhancement

Tracking

(firefox67 fixed)

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/c07aaf12f13037c1f5a343d31f8291549e57373f/devtools/server/actors/source.js#177-180
get url() {
if (this.source) {
return getSourceURL(this.source, this.threadActor._parent.window);
}
return this._originalUrl;
},

We are spending a significant time into SourceActor.url getter.
See this profile: http://bit.ly/2Rty0U6 related to bug 1523937.

And it appears that we are accessing the url getter many times, while getSourceURL isn't that fast to execute.
It would be beneficial for performance to cache the computed url.

Assignee: nobody → poirot.alex
Priority: -- → P2

Depends on D18244

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Regressions: 1565578
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: