Skip to content
This repository has been archived by the owner. It is now read-only.

[sources] improve updateSource performance #6856

Merged
merged 1 commit into from Aug 21, 2018

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

This comment has been minimized.

@darkwing

darkwing Aug 21, 2018
Contributor

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
2 checks passed
2 checks passed
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants