Castanets icon indicating copy to clipboard operation
Castanets copied to clipboard

Use SharedMemory for Data Pipe without data transfer

Open is46-kim opened this issue 5 years ago • 2 comments

Goal : Load resources directly on renderer side device without network transfer.

Network service sends Mojo DataPipe to transfer the loaded resources to renderer. The DataPipe has a ring buffer consist of shared memory. The DataPipe is delivered by URLLoaderClient::OnStartLoadingResponseBody(mojo::ScopedDataPipeConsumerHandle body) mojo interface.

For browser side navigation scenario, Although the Renderer and Utility have Unix domain socket connections on the same device by (#112), the shared memory handle of DataPipe can not be passed from Utility to Renderer because the Message Pipe of |URLLoaderClient| mojo interface created by Browser and connected on TCP socket channel.

The Shared Memory Handle of DataPipe should be shared between utility and renderer on the same device even through bypassing TCP socket.

is46-kim avatar Jul 31 '19 02:07 is46-kim

[WIP] Use SharedMemory named GUID for Renderer Side Resource Load.

  • Create NamedSharedMemory with GUID for DataPipe in NetworkService
  • Try to open the NamedSharedMemory with received GUID in Renderer https://github.com/is46-kim/Castanets/commit/b99ce495b7af41adacaa8a92f9ec708d9629366c

Loads resources properly in Renderer with WIP patch.

is46-kim avatar Aug 02 '19 07:08 is46-kim

I requested PR https://github.com/Samsung/Castanets/pull/179 This patch sends NamedSharedMemory to share DataPipeConsumerHandle for URLLoaderClient mojo interface connected with TCP.

is46-kim avatar Aug 07 '19 07:08 is46-kim