I don't know much about sessionstore.js, but I imagine that the issues it
faces are similar to those of navigation and session history, which I've
been involved with recently from the servo and spec angles.

Restoring dynamically generated iframes is undecidable. This doesn't stop
Gecko from trying, with a whole host of complicated heuristics (which smaug
claims are necessary for web compat). But Hixie is understandably reluctant
to spec these heuristics, and even if he did, they would probably be paired
down and simplified in some way.

The spec model for navigation is simple - if you navigate back to something
that's still in the bfcache, you see frame hierarchy as it was. If the
entry has been GCed, then the top-level entry is reloaded from the URL, and
that's what you get. The history is shallow. This is simple to spec and
simple to implement, so it's what we're going to go with for Servo until
the web forces us to do otherwise (hopefully never).

As such, I'd support simplifying our sessionstore behavior for this stuff
as much as possible, so that it acts as much like the web as possible in
the long run. If we can get away with ignoring dynamically-generated
iframes, we should.

bholley


On Wed, Nov 13, 2013 at 5:09 AM, David Rajchenbach-Teller <
[email protected]> wrote:

> *** The problem
>
> We are currently faced with a problem on facebook.com (see bug 934935)
> that brings Firefox to its knees because our session restore accumulates
> huge amounts of dead data. This problem is most likely a Facebook bug,
> and we are in touch with the Facebook team to see if they can address
> it, but we are also thinking about counter-measures.
>
> The problem seems to be due to the combination of the following things:
> - facebook.com uses huge URLs (1kb), presumably for some kind of
> ad-tracking (annoying, but not a facebook bug);
> - facebook.com opens iframes and never closes them (presumably a
> facebook bug);
> - facebook.com uses the history API to push states (which increases the
> number of states that we need to save to disk).
>
> The net result is that users who spend lots of time on Facebook without
> Adblock end up with thousands of (conceptually dead) iframes saved to
> sessionstore.js, which is quite bad.
>
>
> *** Discussions
>
> We could get rid of the issue by not saving dynamically generated
> iframes to sessionstore.js.
>
> Or we could not save dynamic iframes that are not visible.
>
> Or we could not save dynamic iframes in non-current positions in the
> history.
>
> etc.
>
> All of these choices would change the semantics of sessionstore.js and
> would alter the user experience when reopening/recovering from crash on
> some sites that make good use of dynamic iframes.
>
> I would like people's opinion on such changes or possible other
> countermeasures.
>
> Cheers,
>  David
>
>
> --
> David Rajchenbach-Teller, PhD
>  Performance Team, Mozilla
> _______________________________________________
> dev-platform mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-platform
>
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to