Skip to content

Refactor attribute handling to avoid marshalling attributes from Gecko into Servo - #11886

Merged
bors-servo merged 11 commits into
servo:masterfrom
bholley:attr_refactor
Jul 6, 2016
Merged

bors-servo merged 11 commits into
servo:masterfrom
bholley:attr_refactor

Conversation

@bholley

@bholley bholley commented Jun 27, 2016 •

Copy link
Copy Markdown
Contributor

This marshaling is slow, because Gecko stores attributes as UTF-16 and does not atomize them in all cases, and it turns out that the need for them in Servo is pretty minimal. With some refactoring across servo and rust-selectors we can fix this.


This change is Reviewable

@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/element.rs, components/script_layout_interface/wrapper_traits.rs, components/script/layout_wrapper.rs

@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • These commits modify style, layout, and script code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 27, 2016
@bholley bholley removed the S-awaiting-review There is new code that needs to be reviewed. label Jun 27, 2016
@bholley

bholley commented Jun 27, 2016

Copy link
Copy Markdown
Contributor Author

This isn't ready for review yet, but I want to test the rust-selectors changes.

@bors-servo try

bors-servo pushed a commit that referenced this pull request Jun 27, 2016
Refactor attribute handling to avoid marshalling attributes from Gecko into Servo

This marshaling is slow, because Gecko stores attributes as UTF-16 and does not atomize them in all cases, and it turns out that the need for them in Servo is pretty minimal. With some refactoring across servo and rust-selectors we can fix this.
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit b92920d with merge 1bf0fd4...

@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-dev

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 27, 2016
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Jun 28, 2016
@bholley

bholley commented Jun 28, 2016

Copy link
Copy Markdown
Contributor Author

@bors-servo try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 44ee15e with merge 9bceb20...

bors-servo pushed a commit that referenced this pull request Jun 28, 2016
Refactor attribute handling to avoid marshalling attributes from Gecko into Servo

This marshaling is slow, because Gecko stores attributes as UTF-16 and does not atomize them in all cases, and it turns out that the need for them in Servo is pretty minimal. With some refactoring across servo and rust-selectors we can fix this.

<!-- 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/11886)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-dev

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 28, 2016
@cbrewster cbrewster added the S-fails-tidy `./mach test-tidy` reported errors. label Jun 28, 2016
@cbrewster

cbrewster commented Jun 28, 2016 •

Copy link
Copy Markdown
Contributor

Tidy failure:

Checking files for tidiness...

./components/script/Cargo.toml:60: Line is longer than 120 characters

./components/style/Cargo.toml:36: Line is longer than 120 characters

./components/layout/Cargo.toml:34: Line is longer than 120 characters

./components/script_layout_interface/Cargo.toml:29: Line is longer than 120 characters

./tests/unit/style/Cargo.toml:16: Line is longer than 120 characters

./ports/geckolib/Cargo.toml:39: Line is longer than 120 characters

@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Jun 28, 2016
@bholley

bholley commented Jun 28, 2016

Copy link
Copy Markdown
Contributor Author

@bors-servo try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 8b7b2f7 with merge c16e5d7...

bors-servo pushed a commit that referenced this pull request Jun 28, 2016
Refactor attribute handling to avoid marshalling attributes from Gecko into Servo

This marshaling is slow, because Gecko stores attributes as UTF-16 and does not atomize them in all cases, and it turns out that the need for them in Servo is pretty minimal. With some refactoring across servo and rust-selectors we can fix this.

<!-- 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/11886)
<!-- Reviewable:end -->
@bholley bholley removed S-awaiting-review There is new code that needs to be reviewed. S-fails-tidy `./mach test-tidy` reported errors. labels Jun 28, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jun 28, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Jun 28, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-dev

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jul 6, 2016
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Jul 6, 2016
@bholley

bholley commented Jul 6, 2016

Copy link
Copy Markdown
Contributor Author

@bors-servo r=SimonSapin

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 187a47d has been approved by SimonSapin

@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 Jul 6, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 187a47d with merge abdf2f2...

bors-servo pushed a commit that referenced this pull request Jul 6, 2016
Refactor attribute handling to avoid marshalling attributes from Gecko into Servo

This marshaling is slow, because Gecko stores attributes as UTF-16 and does not atomize them in all cases, and it turns out that the need for them in Servo is pretty minimal. With some refactoring across servo and rust-selectors we can fix this.

<!-- 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/11886)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows

@bors-servo
bors-servo merged commit 187a47d into servo:master Jul 6, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jul 6, 2016
@Manishearth

Copy link
Copy Markdown
Member

I rebased my stylo work to servo master, and it seems like the corresponding commits for this have not yet arrived in the master branch of gecko-dev, or anywhere else.

I found them in https://bugzilla.mozilla.org/show_bug.cgi?id=1283620 -- could we maintain a separate branch which always builds with servo on Github? i.e. whenever you update a bindings file and it lands, just cherry-pick the relevant gecko commits onto that branch. We can sync it when the commit lands in m-c.

@bholley

bholley commented Jul 6, 2016

Copy link
Copy Markdown
Contributor Author

could we maintain a separate branch which always builds with servo on Github?

Well, it's really a symmetric problem right? If we have a logical changeset that's split across the two repos, it may land first on s/s or m-c. In either case, you need to cherry-pick the corresponding changeset for one repo if you want to build tip on the other. Trying to maintain a "live" revision of one repo that builds with the tip of the other is also fraught - either you need one person always paying attention to every landing, or you need multiple people maintaining the branches, leading to coordination problems.

The best way I've come up with is to maintain two branches which are known to work with each other, which are the stylo branches. This is obviously not great, because sometimes I get behind and don't get the chance to fast-forward the branches and pick up all the changes (like what happened this week). But until we fix the repo problem, I'm not sure there's a better way. Luckily, that's happening now. :-)

@Manishearth

Copy link
Copy Markdown
Member

Well, AIUI things land faster in Servo, and we could just hold off on starting the land process in Gecko until it gets r+d in servo. Or vice versa.

The "known good" branches should work if we're syncing enough. At the same time, I'm not very fond of landing changes on a Servo master when the changes can't actually be tested -- this is why I'm proposing an extra stylo_tip gecko-dev branch which everyone puts their commits on, with regular rebases and force-pushes.

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.

8 participants