MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Feature]: Fast way to send large amounts of data to frontend
@Lakshmisha-KS is already working on this.
Since Feb 12, 2025.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Describe the feature/enhancement you need
I'm looking for the fastest way to push large amounts of data to a WebGL/WebGPU context and render something in the WebGL/WebGPU scene.
The pipeline looks like this: CPU -> IPC -> WebView2 -> GPU
However, the performance is very slow, and there are many points of failure along the way.
Our algorithm runs on the CPU (soon on the GPU with OpenCL)
The generated data is sent via IPC to the WebView, which is really slow,
The WebView2 runs web code that pushes the data to the GPU as a texture, e.g webGPU....writeTexture()
All of these steps take time.
For example, just pushing the texture data to the GPU takes 1.2s with WebGPU, while the equivalent pure C code takes 1.2ms (!!!!!!) with CUDA/OpenCL.
One idea I had was to create an offscreen C/C++ OpenGL renderer and send the frames to the WebView2, but since IPC is slow, this won't work. Sending 62MB of data from C to WebVIew2 takes 4 seconds.
What is the absolute best and most efficient way to render something in my C backend and show it in a on my WebView2?
The scenario/use case where you would use this feature
App generates large amounts of data very fast in the native app and then displays the output in the WebView2 frontend.
How important is this request to you?
Critical. My app's basic functions wouldn't work without it.
Suggested implementation
Shared memory block
Shared WebGL / WebGPU handle
Shared HTML canvas handle
What does your app do? Is there a pending deadline for this request?
My app is a HPC realtime data visualizer
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.