Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Images in a Multiprocess World
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bobby Holley  
View profile  
 More options Jun 22 2009, 7:35 pm
Newsgroups: mozilla.dev.tech.dom
From: Bobby Holley <bobbyhol...@stanford.edu>
Date: Tue, 23 Jun 2009 01:35:04 +0200
Local: Mon, Jun 22 2009 7:35 pm
Subject: Images in a Multiprocess World
Hi all,

I put together a design document on the work I'm going to be doing on  
multiprocess image handling for Electrolysis. It's on the wiki at https://wiki.mozilla.org/Multiprocess_Images

I'd appreciate any input or feedback on the matter.

Cheers,
-bholley


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Boris Zbarsky  
View profile  
 More options Jun 22 2009, 10:16 pm
Newsgroups: mozilla.dev.tech.dom
From: Boris Zbarsky <bzbar...@mit.edu>
Date: Mon, 22 Jun 2009 22:16:58 -0400
Local: Mon, Jun 22 2009 10:16 pm
Subject: Re: Images in a Multiprocess World

Bobby Holley wrote:
> I put together a design document on the work I'm going to be doing on
> multiprocess image handling for Electrolysis. It's on the wiki at
> https://wiki.mozilla.org/Multiprocess_Images

> I'd appreciate any input or feedback on the matter.

Some thoughts:

1)  What are the benefits of sharing the image cache between all content
processes?  Some of the drawbacks are obvious: stopping animations in
one tab stops animations of the same images in other tabs, for example.
  How common is it that different tabs/windows really share the same
images?  Would things be better in that regard if we used
process-per-domain or some such?  Or otherwise grouped multiple tabs
into a single process?

2)  The current plan assumes that content/layout consumers will just
keep calling loadImage.  But they need to make a content policy call
before doing that; will content policies run in the renderer processes
or in chrome?  If the latter, then presumably the loadImage shouldn't
run in the renderer process either.

3) Similar for security checks (which also need to happen before loadImage).

-Boris


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benjamin Smedberg  
View profile  
 More options Jun 23 2009, 10:17 am
Newsgroups: mozilla.dev.tech.dom
From: Benjamin Smedberg <benja...@smedbergs.us>
Date: Tue, 23 Jun 2009 10:17:05 -0400
Local: Tues, Jun 23 2009 10:17 am
Subject: Re: Images in a Multiprocess World
On 6/22/09 7:35 PM, Bobby Holley wrote:

> Hi all,

> I put together a design document on the work I'm going to be doing on
> multiprocess image handling for Electrolysis. It's on the wiki at
> https://wiki.mozilla.org/Multiprocess_Images

> I'd appreciate any input or feedback on the matter.

It's not clear to me that a shared image cache is necessary or desirable.
From the document, the main reason for a shared cache is to avoid
"downloading and decoding the same image multiple times unnecessarily
(TODO-elaborate). "

I would hope, though, that the network cache, which is planned to be shared,
would take care of making sure we don't download images twice. Is image
decoding really an expensive-enough operation that we want to add lots of
extra machinery?

I figured the major reason to share the image cache would be to avoid the
memory overhead of having the same decoded image data in multiple processes.
But I think we'd actually need to collect data about whether users would
actually end up with multiple unrelated tabs with many shared images before
trying to implement a complex shared solution.

--BDS


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Drew  
View profile  
 More options Jun 23 2009, 12:08 pm
Newsgroups: mozilla.dev.tech.dom
From: Joe Drew <j...@mozilla.com>
Date: Tue, 23 Jun 2009 12:08:16 -0400
Local: Tues, Jun 23 2009 12:08 pm
Subject: Re: Images in a Multiprocess World

On Jun 23, 2009, at 10:17 AM, Benjamin Smedberg wrote:

> I would hope, though, that the network cache, which is planned to be  
> shared,
> would take care of making sure we don't download images twice. Is  
> image
> decoding really an expensive-enough operation that we want to add  
> lots of
> extra machinery?

We already have that extra machinery in the form of the image cache.  
Decoding on its own isn't that expensive, but doing it over and over  
for the same images sucks, and breaks some web consumers (see bug  
466586).

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benjamin Smedberg  
View profile  
 More options Jun 23 2009, 12:43 pm
Newsgroups: mozilla.dev.tech.dom
From: Benjamin Smedberg <benja...@smedbergs.us>
Date: Tue, 23 Jun 2009 12:43:49 -0400
Local: Tues, Jun 23 2009 12:43 pm
Subject: Re: Images in a Multiprocess World
On 6/23/09 12:08 PM, Joe Drew wrote:

> On Jun 23, 2009, at 10:17 AM, Benjamin Smedberg wrote:

>> I would hope, though, that the network cache, which is planned to be
>> shared,
>> would take care of making sure we don't download images twice. Is image
>> decoding really an expensive-enough operation that we want to add lots of
>> extra machinery?

> We already have that extra machinery in the form of the image cache.
> Decoding on its own isn't that expensive, but doing it over and over for
> the same images sucks, and breaks some web consumers (see bug 466586).

I believe that with multi-process we're unlikely to be using the same image
in multiple tabs, and we could just use a per-process image cache. Are you
saying there are web-compat issues where if we had a per-process image cache
backed by the necko HTTP cache we'd somehow cause problems for websites?

--BDS


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Drew  
View profile  
 More options Jun 23 2009, 1:24 pm
Newsgroups: mozilla.dev.tech.dom
From: Joe Drew <j...@mozilla.com>
Date: Tue, 23 Jun 2009 13:24:52 -0400
Local: Tues, Jun 23 2009 1:24 pm
Subject: Re: Images in a Multiprocess World

On Jun 23, 2009, at 12:43 PM, Benjamin Smedberg wrote:

> I believe that with multi-process we're unlikely to be using the  
> same image
> in multiple tabs, and we could just use a per-process image cache.  
> Are you
> saying there are web-compat issues where if we had a per-process  
> image cache
> backed by the necko HTTP cache we'd somehow cause problems for  
> websites?

No, definitely not. I was perhaps reading too much into what you'd  
written, which sounded like it was advocating getting rid of the image  
cache altogether.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benjamin Smedberg  
View profile  
 More options Jun 23 2009, 1:41 pm
Newsgroups: mozilla.dev.tech.dom
From: Benjamin Smedberg <benja...@smedbergs.us>
Date: Tue, 23 Jun 2009 13:41:10 -0400
Local: Tues, Jun 23 2009 1:41 pm
Subject: Re: Images in a Multiprocess World
On 6/23/09 1:24 PM, Joe Drew wrote:

> No, definitely not. I was perhaps reading too much into what you'd
> written, which sounded like it was advocating getting rid of the image
> cache altogether.

Oh, not at all! Just not doing new work to share the image cache across
multiple processes.

--BDS


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lucas Adamski  
View profile  
 More options Jun 23 2009, 6:50 pm
Newsgroups: mozilla.dev.tech.dom
From: Lucas Adamski <lu...@mozilla.com>
Date: Tue, 23 Jun 2009 15:50:27 -0700
Local: Tues, Jun 23 2009 6:50 pm
Subject: Re: Images in a Multiprocess World
I have no evidence to back this up but it does seem like sharing  
images across tabs is actually fairly frequent occurrence when the  
tabs are all from the same site.  FWIW my pattern for reading news is  
to open up a new tab for each interesting story, then close them as I  
read each one.   Maybe I'm an anomaly in that case.  Performance wise  
we might be damned if we do or damned if we don't.. pageload latency  
and network cost vs increased IPC overhead.  We'd also be responsible  
for a not-insignificant increase in server loads for most websites.  
It might also making scaling to many processes harder in the future  
due to memory consumption issues, unless we have a dynamic per-proc  
cache size limit?

I'm also wondering if there might be concerns about the same image  
being out of sync between tabs, but maybe there's really no guarantee  
of that anyway given cache performance is not very reliable from a web  
dev perspective.
   Lucas.

On Jun 23, 2009, at 9:43 AM, Benjamin Smedberg wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benjamin Smedberg  
View profile  
 More options Jun 23 2009, 8:11 pm
Newsgroups: mozilla.dev.tech.dom
From: Benjamin Smedberg <benja...@smedbergs.us>
Date: Tue, 23 Jun 2009 20:11:04 -0400
Local: Tues, Jun 23 2009 8:11 pm
Subject: Re: Images in a Multiprocess World
On 6/23/09 6:50 PM, Lucas Adamski wrote:

> I have no evidence to back this up but it does seem like sharing images
> across tabs is actually fairly frequent occurrence when the tabs are all
> from the same site.  FWIW my pattern for reading news is to open up a
> new tab for each interesting story, then close them as I read each
> one.   Maybe I'm an anomaly in that case.  Performance wise we might be
> damned if we do or damned if we don't.. pageload latency and network
> cost vs increased IPC overhead.  We'd also be responsible for a

I suspect that same-domain loads will normally be handled by the same
process, even if they happen to occur in multiple tabs. But again, without
measurement this seems like a premature optimization.

We shouldn't incur any network cost in the common cases, assuming the HTTP
cache behaves reasonably. Duplicate memory usage is more concerning...
perhaps we can arrange for global control of all the caches in some manner
if that shows up as a significant issue.

--BDS


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »