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

On Mac, multi-threaded font rasterization spends all of its time in CGContext creation and destruction, waiting for locks #2406

Closed
mstange opened this issue Feb 11, 2018 · 0 comments
Assignees

Comments

@mstange
Copy link
Contributor

@mstange mstange commented Feb 11, 2018

Profile: https://perfht.ml/2BnYout

For example, you can see that CGBitmapContextCreate ends up calling into _RIPAddContextToContextList which grabs a lock. With multiple WRWorker threads, locking overhead seems to dwarf actual rasterization.

@pcwalton pcwalton self-assigned this Aug 2, 2018
pcwalton added a commit to pcwalton/webrender that referenced this issue Sep 17, 2018
This should avoid locks and save some memory allocation time.

Closes servo#2406.
pcwalton added a commit to pcwalton/webrender that referenced this issue Sep 18, 2018
This should avoid locks and save some memory allocation time.

Closes servo#2406.
pcwalton added a commit to pcwalton/webrender that referenced this issue Sep 18, 2018
This should avoid locks and save some memory allocation time.

Closes servo#2406.
pcwalton added a commit to pcwalton/webrender that referenced this issue Sep 19, 2018
This should avoid locks and save some memory allocation time.

Closes servo#2406.
pcwalton added a commit to pcwalton/webrender that referenced this issue Sep 19, 2018
This should avoid locks and save some memory allocation time.

Closes servo#2406.
bors-servo added a commit that referenced this issue Sep 19, 2018
Recycle Core Graphics contexts when rasterizing glyphs.

This should avoid locks and save some memory allocation time.

Closes #2406.

r? @gw3583 (or whoever wants to)

<!-- 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/3071)
<!-- Reviewable:end -->
pcwalton added a commit to pcwalton/webrender that referenced this issue Sep 20, 2018
This should avoid locks and save some memory allocation time.

This patch also updates Pathfinder so we can keep the `core-graphics` crate
versions in sync.

Closes servo#2406.
pcwalton added a commit to pcwalton/webrender that referenced this issue Sep 20, 2018
This should avoid locks and save some memory allocation time.

This patch also updates Pathfinder so we can keep the `core-graphics` crate
versions in sync.

Closes servo#2406.
bors-servo added a commit that referenced this issue Sep 20, 2018
Recycle Core Graphics contexts when rasterizing glyphs.

This should avoid locks and save some memory allocation time.

Closes #2406.

r? @gw3583 (or whoever wants to)

<!-- 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/3071)
<!-- 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.

None yet
3 participants
You can’t perform that action at this time.