Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upPurge pipelines from distant history. #11893
Conversation
This comment has been minimized.
This comment has been minimized.
r? @asajeffrey |
This comment has been minimized.
This comment has been minimized.
cc @ConnorGBrewster |
This comment has been minimized.
This comment has been minimized.
Can someone summarise what that does? Is history still conserved even if pipelines are purged? |
This comment has been minimized.
This comment has been minimized.
@paulrouget I believe the idea is that we will keep |
This comment has been minimized.
This comment has been minimized.
Ok, so we keep the history even if the pipeline is purged. That's all I was worried about :) |
This comment has been minimized.
This comment has been minimized.
@paulrouget yup! they are reloaded here https://github.com/servo/servo/pull/11893/files#diff-55c92a6a5ba7654ce45fe6fc6c63740fR1416 |
This comment has been minimized.
This comment has been minimized.
I'm quite concerned about what happens when pipelines share a script thread. If page A contains a same-origin iframe, which starts out at B1, then navigates to B2, B3 and B4. This will trigger |
This comment has been minimized.
This comment has been minimized.
Reviewed 1 of 1 files at r1. components/constellation/constellation.rs, line 222 [r1] (raw file):
The terminology of alive vs dead doesn't seem aligned with the spec. https://html.spec.whatwg.org/multipage/browsers.html#session-history has a note saying "when a Document is not active, it's possible for it to be discarded to free resources," defined in https://html.spec.whatwg.org/multipage/browsers.html#discard-a-document. components/constellation/constellation.rs, line 224 [r1] (raw file):
Should the data saved here be Is the privacy associated with the history entry or with the frame? (That is, can we have a frame, some of whose entries are private and some are public?) components/constellation/constellation.rs, line 244 [r1] (raw file):
Can we add a comment saying what the semantics of this function is? components/constellation/constellation.rs, line 246 [r1] (raw file):
Passing the pipelines hash map around seems like a break in the abstraction barrier between components/constellation/constellation.rs, line 247 [r1] (raw file):
What is this parameter for? components/constellation/constellation.rs, line 264 [r1] (raw file):
Shouldn't this functionality be in components/constellation/constellation.rs, line 273 [r1] (raw file):
Doesn't this exit a pipeline even if the script thread is being used by its parent? components/constellation/constellation.rs, line 1423 [r1] (raw file):
Should we set the window URL, even if it's a child iframe that caused this navigation? Comments from Reviewable |
This comment has been minimized.
This comment has been minimized.
As a general comment, it strikes me that this is one way of handling document discarding, but not the only way. Rather than having a per-frame hard limit on history, we could have a per-constellation soft limit. |
This comment has been minimized.
This comment has been minimized.
@Ms2ger is this still active? |
This comment has been minimized.
This comment has been minimized.
Yes, I'm going to get back to your review comments, hopefully this week. |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
@Ms2ger ping? |
This comment has been minimized.
This comment has been minimized.
Rebased. |
let mut future = vec!(); | ||
for frame in self.full_frame_tree_iter(frame_id_root) { | ||
future.extend(frame.next.iter().map(|entry| (entry.instant, entry.frame_id, entry.pipeline_id))); | ||
future.extend(frame.next.iter().map(|entry| (entry.instant, entry.frame_id, entry.entry.clone()))); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
Review status: 0 of 1 files reviewed at latest revision, 10 unresolved discussions, some commit checks failed. components/constellation/constellation.rs, line 305 [r3] (raw file):
Should we be purging everything but the previous/next Comments from Reviewable |
This comment has been minimized.
This comment has been minimized.
Added some docs for |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
Inline push_pending_frame into its callers. The recently added replace argument makes it less readable, especially with the second boolean argument I am adding in #11893. <!-- 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/13334) <!-- Reviewable:end -->
This comment has been minimized.
This comment has been minimized.
I have no idea what this is doing anymore. @asajeffrey @ConnorGBrewster, wanna take over? |
This comment has been minimized.
This comment has been minimized.
This is quite tricky, especially with sharing script threads (and there are bugs around when script threads are shared, sigh). We may need to postpone this until we get the sharing script threads story straight. Either that or we need to work out how to get a script thread to cope with some of its globals being dead, and some being alive. |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
@asajeffrey is going to take over this work. He's planning to rework script thread sharing which will further impact this, and at this point it probably makes sense for him to just include purging in his plans. |
This comment has been minimized.
This comment has been minimized.
@ConnorGBrewster: document unloading will be in our future |
Ms2ger commentedJun 28, 2016
•
edited by larsbergstrom
This change is