This is kind of OT, but > OTOH, if the computer has memory available, we should be using *all* of it > any place we can trade > memory for speed.
We considered this idea in MemShrink some months ago, and we mostly dropped it. There are two essential problems that we weren't able to overcome. 1) It's not always simple to determine how much memory the system has available. This is particularly true on Mac, as it turns out; bug 789975 says we can't even accurately measure our own memory usage on Mac. The issue is that the OS keeps some types of free'd pages in a process's address space and only releases them when the system is very low on memory, but it doesn't give us any way (that I'm aware of) to measure how many of these pages there are. 2) More importantly, using as much RAM is available but no more makes Firefox the nicest process on the system. We can get into a situation where, because some other program is hogging memory, the user's swipe animations stop working as she expects. That may look like a bug in Firefox, and in any case it may not be what the user wants. Doing this makes Firefox change its behavior based upon what other processes on the system are doing, and I'm not convinced that's a safe thing to do in general. But this is a better discussion to have in the context of DDD than in the context of this bug. -Justin On Wed, Feb 13, 2013 at 9:13 AM, Benjamin Smedberg <benja...@smedbergs.us> wrote: > On 2/13/2013 3:12 AM, Justin Lebar wrote: >> >> c) Consider adaptive techniques so that users who use this feature >> heavily will store more screenshots (at the cost of more memory), >> while those who don't use it won't pay a price. > > Apart from the other solution of re-rendering directly from bfcache, this > seems like the obvious longer-term solution, and it ties in with Josh's > proposal about "ddd". I don't think there's any way to make absolute > judgements about whether 2.5MB or 5MB or 10MB is "reasonable" for a feature, > and there's a lot of room for adaptive data-driven behavior here. If the > computer is memory-constrained, then we should be evicting all sorts of > memory-based caches pretty aggressively, and this is one of them. OTOH, if > the computer has memory available, we should be using *all* of it any place > we can trade memory for speed. > > Other possible technical tradeoffs that might be possible: > > * render from bfcache if its present > * when we evict from bfcache, take a high-res snapshot > * when things go back far enough, compress or resample the image to a > low-res snapshot. > > Is there a video/demo/feature page which explains what this feature actually > is? I've seen status updates about a new cool swipe thing, but I don't > actually know what problem its solving. Is this feature mac-only, or is it > starting out on mac and we'll be porting it back to other platforms? Or is > it touchscreen-only? > > --BDS > > > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform