Skip to content
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

Stringify layers for faster worker transfer #3172

Closed
wants to merge 1 commit into from
Closed

Conversation

mourner
Copy link
Member

@mourner mourner commented Sep 12, 2016

Ref #3153, not the cleanest change but appears to reduce time-to-fist-render by ~150ms.

Couldn’t run benchmarks yet because they seem to be broken at the moment (only run on master).

cc @jfirebaugh @lucaswoj

@mourner
Copy link
Member Author

mourner commented Sep 12, 2016

Benchmarks

buffer

master 1f8351d: 916 ms
stringify-layers 6ad9724: 943 ms

frame-duration

master 1f8351d: 10.6 ms, 15% > 16ms
stringify-layers 6ad9724: 10.5 ms, 15% > 16ms

@lucaswoj
Copy link
Contributor

lucaswoj commented Sep 12, 2016

LGTM

appears to reduce time-to-first-render by ~150ms

How many ms is the time-to-first-render now? Does the map-load bench capture this metric? Could we write a benchmark that does capture this metric?

@mourner
Copy link
Member Author

mourner commented Sep 12, 2016

@lucaswoj looking at the timeline, it's still around 2000ms, but I haven't captured it exactly yet, and the benchmarks don't capture this too — I thought about adding one, although this should be a separate PR.

@anandthakker
Copy link
Contributor

Does the map-load bench capture this metric? Could we write a benchmark that does capture this metric?

@lucaswoj @mourner I think it probably makes sense to just change the map-load bench into a first-render, since the latter is what matters most?

@mourner
Copy link
Member Author

mourner commented Sep 14, 2016

Benchmarks barely show a ~50-100ms difference, so it might not be worth the added hackiness.

@anandthakker
Copy link
Contributor

@mourner If this change speeds up the set layers and update layers actions, then it could also affect the performance of style mutation methods like map.setFilter(), etc., right? For those cases, I think even a few ms difference can matter.

Copy link
Contributor

@lucaswoj lucaswoj left a comment

Choose a reason for hiding this comment

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

Benchmarks barely show a ~50-100ms difference, so it might not be worth the added hackiness.

This PR is mergeable. Your call on whether or not to merge it.

Thanks for testing this!

@lucaswoj
Copy link
Contributor

lucaswoj commented Oct 4, 2016

Closing as stale. We can come back to this at any time.

@lucaswoj lucaswoj closed this Oct 4, 2016
@jfirebaugh jfirebaugh deleted the stringify-layers branch February 3, 2017 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants