New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sources] improve updateSource performance #6856

Merged
merged 1 commit into from Aug 21, 2018

Conversation

Projects
None yet
2 participants
@jasonLaster
Contributor

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 devtools-html:master Aug 21, 2018

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 join this conversation on GitHub. Already have an account? Sign in to comment