Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Comments

[sources] improve updateSource performance#6856

Merged
darkwing merged 1 commit intofirefox-devtools:masterfrom
jasonLaster:sources-update
Aug 21, 2018
Merged

[sources] improve updateSource performance#6856
darkwing merged 1 commit intofirefox-devtools:masterfrom
jasonLaster:sources-update

Conversation

@jasonLaster
Copy link
Contributor

@jasonLaster jasonLaster commented Aug 21, 2018

Issue: #6829

Summary of Changes

  • speeds up updateSource by a lot.

old

https://perfht.ml/2OUOQKH

screen shot 2018-08-21 at 1 39 52 pm

new

https://perfht.ml/2OVCMsz

screen shot 2018-08-21 at 1 32 48 pm

now the time spent is almost entirely in the UI which is the bigger blips next to the longer bars in the old perf graph

image


const existingUrls = state.urls[source.url];
const urls = existingUrls ? [...existingUrls, source.id] : [source.id];
state.urls[source.url] = existingUrls
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to take into account origin vs. generated here? Since a sourcemap can have the same URL?

@darkwing darkwing merged commit 45e5aae into firefox-devtools:master Aug 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants