Modifying Site Allocation Policy/ Multi Process Architecture

133 views
Skip to first unread message

Karthi Fair Hawn

unread,
Jan 7, 2025, 11:31:07 AM1/7/25
to Chromium-dev
The goal: To give individual process for same-orgin iframes inside a tab. (As per chromium site allocation policy which uses same process for all iframe inside a tab if it is same orgin).

I'm trying to do this to achieve performance for apps loaded inside iframes, which are same orgin but different app.

Dave Tapuska

unread,
Jan 7, 2025, 11:42:40 AM1/7/25
to karthif...@gmail.com, Chromium-dev
This isn't possible with the architecture without breaking standards. Same origin iframes can directly script one another which means they need to run in the same event loop (which then implies the same renderer process).  You can certainly have iframes in separate processes if you severe the direct scripting requirement by using things like sandboxed iframes, controlled frames or fenced frames.

dave.

On Tue, Jan 7, 2025 at 11:30 AM Karthi Fair Hawn <karthif...@gmail.com> wrote:
The goal: To give individual process for same-orgin iframes inside a tab. (As per chromium site allocation policy which uses same process for all iframe inside a tab if it is same orgin).

I'm trying to do this to achieve performance for apps loaded inside iframes, which are same orgin but different app.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/8e089df0-0b80-41b7-b77e-2d9e3a0d67ebn%40chromium.org.

Charlie Reis

unread,
Jan 7, 2025, 11:52:35 AM1/7/25
to dtap...@chromium.org, karthif...@gmail.com, Chromium-dev, Camille Lamy
That's correct-- you can read more about the constraints at https://chromium.googlesource.com/chromium/src/+/main/docs/process_model_and_site_isolation.md.  See also the (in progress) Document-Isolation-Policy work for another way to sever the scripting requirement and use a separate process for same-origin documents.

Charlie

Karthi Fair Hawn

unread,
Jan 8, 2025, 11:08:20 AM1/8/25
to Chromium-dev, Charlie Reis, karthif...@gmail.com, Chromium-dev, Camille Lamy, dtap...@chromium.org
we're planning to modify chromium and make a electron app with it, So I assume breaking the standards on Site Allocation is fine (as we're not making browser).

Does modifying chromium to give individual process per frame makes any performance boost ? 
 As of my exploration, there were many talks on security advantages on process separation, but cant find anything related to performance except, Here it says"Site Isolation can affect performance in several ways, both positive and negative: " 




Other than site isolation, Is there any other chromium changes we can do to achieve performance ? (Our site purely based on Iframes -15+ same orgin iframes).

Charlie Reis

unread,
Jan 8, 2025, 2:19:30 PM1/8/25
to Karthi Fair Hawn, Chromium-dev, Camille Lamy, dtap...@chromium.org
Does modifying chromium to give individual process per frame makes any performance boost ? 
 As of my exploration, there were many talks on security advantages on process separation, but cant find anything related to performance except, Here it says"Site Isolation can affect performance in several ways, both positive and negative: " 

That entire Performance paragraph (and section 5.3 of the paper) go into more detail on the performance impact.  In general, using separate processes for the frames in your app won't boost any individual frame's performance, but it can reduce contention between frames by giving them each their own main threads.  If you have a limited number of frames, can handle the extra memory overhead, and expect the frames to be doing concurrent work, then you might see some responsiveness advantages to using separate processes for them.  It may also help if the frames have high memory use themselves, such that an out-of-memory (OOM) crash in one doesn't take down the others.

Charlie
Reply all
Reply to author
Forward
0 new messages