Fastest way to pass binary data into webview #5361
Unanswered
LadislavBohm
asked this question in
Q&A
Replies: 2 comments
-
|
Have you considered / investigated "SharedBuffer"? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
SharedBuffer is the way. I'm running an oscilloscope demo using it, passing 20 million samples per second and could easily go higher. This uses a shared buffer of 128Mb divided up into 128 1Mb slots. I also have a POD demo using sharedbuffer that passes 25kHz packets per second (packet size ambivalent) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to ask what is the fastest way to pass data into javascript hosted inside webview2 from C#?
My use-case is that I have some binary file processing in C# and I need to pass it to my javascript code which will render it. This data can be over 100MB large so good performance is important. I would say that in perfect scenario it should be memory copy so very fast way should be possible.
I can see there are several ways to communicate from C# to webview:
With HTTP Stream response I'm able to transfer about 100MB of data in about 300-600ms to javascript which is not terrible but I'm wondering if there is some faster way. Even if it's less developer friendly and requires native calls I'm ok with anything really.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions