[webkit-dev] NetworkProcess / NetworkThread in the UIProcess

Zeno Albisser zeno at webkit.org
Tue Feb 12 07:51:07 PST 2013


Hi,

I have been looking into the NetworkProcess code that has recently been
added to WebKit2. For Qt we are considering moving all the networking into
a separate thread within the UIProcess.

Do you guys think that the NetworkProcess code could be designed in a way
to allow running in a separate thread of the UIProcess instead of in a
separate process?
We are convinced that this design would be a very good fit for our needs.
Also in the light of the currently ongoing effort of cleaning up our
Qt-bits and pieces in WebKit2.

After a quick look it seems to me that this could be achieved with fairly
minor modifications:

* Instead of relying on RunLoop::main() within NetworkProcess, a different
function would need to be introduced to retrieve a "networking RunLoop".
This would allow to process networking related events in the network
thread. Depending on the platform, this could of course return a pointer to
the main-RunLoop, for the cases where networking is indeed executed in a
separate process.

* Splitting the NetworkProcess class in two pieces. The child process and
IPC setup remaining in NetworkProcess, and the actual networking code in a
separate class (e.g. called NetworkThread).
Provided the IPC (between threads in our case) would be setup upfront this
would allow running the code provided by NetworkThread in a separate thread.

Would patches aiming such a direction generally be accepted?

Thanks,

- Zeno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130212/19a55c1b/attachment.html>


More information about the webkit-dev mailing list