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

style: Iterate the LRU cache contents from back to front. #15891

Merged
merged 5 commits into from Mar 11, 2017

Conversation

@emilio
Copy link
Member

emilio commented Mar 9, 2017

This is on top of #15888. Only the second commit needs review.

We put the more recently used item last, so iterating then from left to right is
pointless.


This change is Reviewable

@highfive
Copy link

highfive commented Mar 9, 2017

Heads up! This PR modifies the following files:

  • @bholley: components/style/cache.rs, components/style/matching.rs
@highfive
Copy link

highfive commented Mar 9, 2017

warning Warning warning

  • These commits modify style code, but no tests are modified. Please consider adding a test!
@emilio
Copy link
Member Author

emilio commented Mar 9, 2017

@highfive highfive assigned SimonSapin and unassigned Manishearth Mar 9, 2017
@bholley
Copy link
Contributor

bholley commented Mar 9, 2017

File an E-Easy for converting this cache to a VecDeque to avoid memmoving each time we need to pop the least-recently-used entry?

@bors-servo delegate+

@bors-servo
Copy link
Contributor

bors-servo commented Mar 9, 2017

✌️ @emilio can now approve this pull request

@emilio
Copy link
Member Author

emilio commented Mar 9, 2017

File an E-Easy for converting this cache to a VecDeque to avoid memmoving each time we need to pop the least-recently-used entry?

I don't think that happens a lot of times since we clear it often, but sure.

@bors-servo
Copy link
Contributor

bors-servo commented Mar 9, 2017

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

@emilio emilio force-pushed the emilio:lru-back-to-front branch from 5da67e3 to be42f4b Mar 9, 2017
@emilio
Copy link
Member Author

emilio commented Mar 9, 2017

@bors-servo r=bholley

@bors-servo
Copy link
Contributor

bors-servo commented Mar 9, 2017

📌 Commit be42f4b has been approved by bholley

@bors-servo
Copy link
Contributor

bors-servo commented Mar 9, 2017

Testing commit be42f4b with merge 6280dba...

bors-servo added a commit that referenced this pull request Mar 9, 2017
style: Iterate the LRU cache contents from back to front.

This is on top of #15888. Only the second commit needs review.

We put the more recently used item last, so iterating then from left to right is
pointless.

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

bors-servo commented Mar 9, 2017

💔 Test failed - mac-rel-css

@emilio
Copy link
Member Author

emilio commented Mar 9, 2017

@bors-servo retry

  • Subpixel difference near a border corner, huh
@bors-servo
Copy link
Contributor

bors-servo commented Mar 9, 2017

Testing commit be42f4b with merge 0be18f5...

bors-servo added a commit that referenced this pull request Mar 9, 2017
style: Iterate the LRU cache contents from back to front.

This is on top of #15888. Only the second commit needs review.

We put the more recently used item last, so iterating then from left to right is
pointless.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15891)
<!-- Reviewable:end -->
@emilio
Copy link
Member Author

emilio commented Mar 10, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Mar 10, 2017

Trying commit eecd38a with merge 3b9a074...

bors-servo added a commit that referenced this pull request Mar 10, 2017
style: Iterate the LRU cache contents from back to front.

This is on top of #15888. Only the second commit needs review.

We put the more recently used item last, so iterating then from left to right is
pointless.

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

bors-servo commented Mar 10, 2017

@emilio
Copy link
Member Author

emilio commented Mar 10, 2017

Last commit fixes the reftests failures, I've asked @mbrubeck to take a look.

@mbrubeck
Copy link
Contributor

mbrubeck commented Mar 10, 2017

r=mbrubeck for the layout fix

@emilio
Copy link
Member Author

emilio commented Mar 11, 2017

@bors-servo r=bholley,mbrubeck

@bors-servo
Copy link
Contributor

bors-servo commented Mar 11, 2017

📌 Commit eecd38a has been approved by bholley,mbrubeck

emilio added 5 commits Mar 9, 2017
We put the more recently used item last, so iterating then from left to right is
pointless.
@emilio emilio force-pushed the emilio:lru-back-to-front branch from eecd38a to 4bafded Mar 11, 2017
@emilio
Copy link
Member Author

emilio commented Mar 11, 2017

@bors-servo r=bholley,mbrubeck

@bors-servo
Copy link
Contributor

bors-servo commented Mar 11, 2017

📌 Commit 4bafded has been approved by bholley,mbrubeck

@bors-servo
Copy link
Contributor

bors-servo commented Mar 11, 2017

Testing commit 4bafded with merge 7fa4a94...

bors-servo added a commit that referenced this pull request Mar 11, 2017
style: Iterate the LRU cache contents from back to front.

This is on top of #15888. Only the second commit needs review.

We put the more recently used item last, so iterating then from left to right is
pointless.

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

bors-servo commented Mar 11, 2017

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-gnu-dev, windows-msvc-dev
Approved by: bholley,mbrubeck
Pushing 7fa4a94 to master...

@bors-servo bors-servo merged commit 4bafded into servo:master Mar 11, 2017
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@emilio emilio deleted the emilio:lru-back-to-front branch Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

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