| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Hi @AnsisMalins, Some observations:
We do like this idea in general, as ClearScript already provides special treatment for typed arrays elsewhere. Typed arrays were designed for performance-critical scenarios. Can you tell us anything about yours? Thanks! |
Sorry, something went wrong.
|
Yes, I missed a file there. Oops! The specific case I'm trying to solve is, JavaScript code sends new byte arrays to C# side many times per frame, 60 frames per second. As is, for every JavaScript object a V8ObjectImpl is created on the C# side, and I'm trying to bring allocations per frame down to zero. I have limited control over the JavaScript side, so I can't ensure it reuses a small amount JavaScript objects. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This change adds a new Uint8Array type that mirrors the V8's type. It is a readonly ref struct. The use case is to retrieve it and pass it around inside the calling code for some small distance until its contents can be copied out to a byte[] array.
By itself, this change does no avoid the allocation of a V8ObjectImpl as that still happens in V8FastArgs.ctor.