Skip to content

Extract & encapsulate 'InvokeUnmarshalled' in JSInterop #21492

@majda107

Description

@majda107

After digging deep into these issues:
#21426
#21444

I've figured out there is a way to invoke unmarshalled js function, making execution many times faster, this comes especially handy if you don't need to encapsulate any objects but only send numeric/string data (like coordinates) speeding up entire thing by so much.

Not something average WebDev may appreciate, but if you need to do something with ~ let's say canvas / js rendering ~ this is a must in order to hit 60fps cap.

If this gets approved by someone, I am definitelly up forking blazor, doing some nice extraction & encapsulation followed by submitting merge request.

You can see demo usage of InvokeUnmarshalled here...
https://blaze.majdatrpkos.cz/ (multi-selected multiple elements with SHIFT and drag them to test performance)
https://github.com/majda107/blaze-cards

wasn't even able to hit solid 60fps before, and that's only CSS transforms rendering, there are potential ways to hook WebGL bindings and stuff so this may really make sense...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.area-blazorIncludes: Blazor, Razor Componentsfeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssembly

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions