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

A lot of time spent in webrender::texture_cache::TextureCache::insert #1266

Closed
jrmuizel opened this issue May 17, 2017 · 2 comments
Closed

A lot of time spent in webrender::texture_cache::TextureCache::insert #1266

jrmuizel opened this issue May 17, 2017 · 2 comments
Assignees

Comments

@jrmuizel
Copy link
Contributor

@jrmuizel jrmuizel commented May 17, 2017

I see this stand out quite a bit in profiles of Firefox scrolling cnn.com and a huge amount scrolling https://perfht.ml/2qxbfmr.

@jrmuizel
Copy link
Contributor Author

@jrmuizel jrmuizel commented May 18, 2017

The profile linked above doesn't actually show the problem it's just a website that reproduces the problem.

Most of the time is being inside TexturePage::coalesce

@kvark
Copy link
Member

@kvark kvark commented May 18, 2017

Our coalesce function is called way too many times and is expensive whenever anything changes. We should optimize both the function implementation and reduce the number of times it's called. I'm looking at it.

@kvark kvark self-assigned this May 18, 2017
bors-servo added a commit that referenced this issue May 22, 2017
Coalescing optimization

Fixes #1266
(if it doesn't fix it yet, the PR would be a step in the right direction anyway)

This PR removes indexing and dynamic allocations from `TexturePage::coalesce`, cleans up the code, adds a basic benchmark for it. Results on my machine - time dropped by about 25%. It's not super great, but I believe that real-world parameters have improved more, given that we are able to capture intermediate coalescing results now even when timed out.

r? @glennw

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1271)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.