Skip to content

layout: Load Web fonts asynchronously. - #7596

Merged
bors-servo merged 2 commits into
servo:masterfrom
pcwalton:async-web-font-loading
Sep 28, 2015
Merged

bors-servo merged 2 commits into
servo:masterfrom
pcwalton:async-web-font-loading

Conversation

@pcwalton

Copy link
Copy Markdown
Contributor

Improves page load times significantly.

Closes #7343.

Review on Reviewable

@pcwalton pcwalton added I-perf-slow Unnecessary performance degredation. A-layout/text labels Sep 10, 2015
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 10, 2015
@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify layout code, but no reftests are modified. Please consider adding a reftest!

@pcwalton

Copy link
Copy Markdown
Contributor Author

r? @mbrubeck

@jdm

jdm commented Sep 10, 2015

Copy link
Copy Markdown
Member

I think I'd prefer this use the official async network request API, rather than the ad-hoc version it currently does.

@pcwalton
pcwalton force-pushed the async-web-font-loading branch from b22e4a4 to 424cb42 Compare September 10, 2015 22:22
@pcwalton

Copy link
Copy Markdown
Contributor Author

Updated to use the API suggested by @jdm.

@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #7559) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Sep 13, 2015
@pcwalton

Copy link
Copy Markdown
Contributor Author

@jdm Did you have any more comments on this? I don't recall if we discussed anything more on IRC.

@pcwalton
pcwalton force-pushed the async-web-font-loading branch from 424cb42 to e195a0a Compare September 15, 2015 23:50
@jdm

jdm commented Sep 16, 2015

Copy link
Copy Markdown
Member

My preference would be to integrate the network requests with some existing thread's event loop, rather than spawning two new threads per requested font.

@pcwalton
pcwalton force-pushed the async-web-font-loading branch from e195a0a to 7d77a5e Compare September 17, 2015 12:24
@pcwalton

Copy link
Copy Markdown
Contributor Author

I eliminated one thread by using the router and the other one by integrating into the layout task event loop. r? @mbrubeck

@pcwalton pcwalton removed the S-needs-rebase There are merge conflict errors. label Sep 17, 2015
@jdm

jdm commented Sep 17, 2015

Copy link
Copy Markdown
Member

Thanks!

@mbrubeck

Copy link
Copy Markdown
Contributor

-S-awaiting-review +S-needs-code-changes


Reviewed 9 of 9 files at r1.
Review status: all files reviewed at latest revision, 3 unresolved discussions, all commit checks successful.


components/gfx/font_cache_task.rs, line 158 [r1] (raw file):
This should check whether the ResponseComplete message contains an Err status.


components/gfx/font_cache_task.rs, line 358 [r1] (raw file):
This result isn't read anywhere. Should we remove it and just send and empty message?


components/layout/layout_task.rs, line 481 [r1] (raw file):
Could we switch these to use descriptive names?


Comments from the review on Reviewable.io

@mbrubeck mbrubeck added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Sep 18, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #7662) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Sep 19, 2015
@pcwalton
pcwalton force-pushed the async-web-font-loading branch from 7d77a5e to 5133ffa Compare September 25, 2015 01:17
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Sep 25, 2015
@pcwalton

Copy link
Copy Markdown
Contributor Author

Review status: 1 of 9 files reviewed at latest revision, 3 unresolved discussions, all commit checks successful.


components/layout/layout_task.rs, line 0 [r1] (raw file):
Hmm, Reviewable didn't seem to save the context here. Could you specify which names you're referring to?


Comments from the review on Reviewable.io

@pcwalton
pcwalton force-pushed the async-web-font-loading branch from 5133ffa to af8c3f1 Compare September 25, 2015 01:34
@pcwalton

Copy link
Copy Markdown
Contributor Author

Rebased and comments addressed except for the naming one. r? @mbrubeck

@pcwalton pcwalton removed the S-needs-rebase There are merge conflict errors. label Sep 25, 2015
@jdm

jdm commented Sep 25, 2015

Copy link
Copy Markdown
Member

If you click on the link in the comment on github you'll see the right context.

@mbrubeck mbrubeck added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Sep 25, 2015
@mbrubeck

Copy link
Copy Markdown
Contributor

-S-awaiting-review +S-needs-code-changes


Reviewed 9 of 9 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.


components/layout/layout_task.rs, line 481 [r1] (raw file):
port1, port2, port3, port4


Comments from the review on Reviewable.io

@pcwalton
pcwalton force-pushed the async-web-font-loading branch from af8c3f1 to 3b72686 Compare September 27, 2015 22:20
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Sep 27, 2015
@pcwalton
pcwalton force-pushed the async-web-font-loading branch from 3b72686 to 1892b27 Compare September 27, 2015 22:37
@pcwalton

Copy link
Copy Markdown
Contributor Author

@mbrubeck Addressed the naming comment. r?

@mbrubeck

Copy link
Copy Markdown
Contributor

Reviewed 4 of 4 files at r3.
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.


Comments from the review on Reviewable.io

@mbrubeck

Copy link
Copy Markdown
Contributor

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 1892b27 has been approved by mbrubeck

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Sep 28, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 1892b27 with merge 7933b48...

bors-servo pushed a commit that referenced this pull request Sep 28, 2015
layout: Load Web fonts asynchronously.

Improves page load times significantly.

Closes #7343.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7596)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-layout/text I-perf-slow Unnecessary performance degredation. S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants