Skip to content

Reduce size of layout::fragment::Fragment struct - #10255

Merged
bors-servo merged 4 commits into
servo:masterfrom
mbrubeck:box-unscanned
Mar 30, 2016
Merged

bors-servo merged 4 commits into
servo:masterfrom
mbrubeck:box-unscanned

Conversation

@mbrubeck

Copy link
Copy Markdown
Contributor

This reduces the size of the SpecificFragmentInfo enum from 48 to 24.

r? @pcwalton


This change is Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 29, 2016
@highfive

Copy link
Copy Markdown

warning Warning warning

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

@mbrubeck

Copy link
Copy Markdown
Contributor Author

Maybe we could also switch from Box<str> back to String now that it doesn't add to the size of Fragment.

@Ms2ger

Ms2ger commented Mar 29, 2016

Copy link
Copy Markdown
Contributor

Should we add a unit test for the size of those types?

@nox

nox commented Mar 29, 2016

Copy link
Copy Markdown
Contributor

@mbrubeck I'm not sure there is any point in doing this, we never change the length of the string right?

@nox

nox commented Mar 29, 2016

Copy link
Copy Markdown
Contributor

IframeFragmentInfo can be unboxed in SpecificFragmentInfo now that it fits an u64.

@mbrubeck

Copy link
Copy Markdown
Contributor Author

Should we add a unit test for the size of those types?

Done.

IframeFragmentInfo can be unboxed in SpecificFragmentInfo now that it fits an u64.

Done.

@mbrubeck

Copy link
Copy Markdown
Contributor Author

The long poles are now InlineBlockFragmentInfo and InlineAbsoluteHypotheticalFragmentInfo. They each contain a FlowRef, which is a fat pointer.

@mbrubeck mbrubeck changed the title Put UnscannedTextFragmentInfo in a Box Reduce size of layout::fragment::Fragment struct Mar 29, 2016
@pcwalton

Copy link
Copy Markdown
Contributor

@bors-servo: r+

Nice!

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 33b9aa4 has been approved by pcwalton

@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 Mar 29, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 33b9aa4 with merge 44b2ba2...

bors-servo pushed a commit that referenced this pull request Mar 30, 2016
Reduce size of layout::fragment::Fragment struct

This reduces the size of the SpecificFragmentInfo enum from 48 to 24.

r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10255)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, status-appveyor

@bors-servo
bors-servo merged commit 33b9aa4 into servo:master Mar 30, 2016
@mbrubeck
mbrubeck deleted the box-unscanned branch May 11, 2016 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

6 participants