Closed Laftek closed 1 year ago
Hi! I responded to what may be your Stack overflow post here: https://stackoverflow.com/questions/75128377/rive-animation-is-really-slow-in-blazor-wasm-after-re-routing-to-the-page-with/75153088#75153088
Basically, try updating to our most recent version 1.0.98
and make sure you're deleting the Rive instances you create (in this case, your variable r
) using this JS runtime.
Thanks Zplata! Its working now :)
So I tried to display rive animation ("/" page) with Blazor WASM (basic template). When I click on Counter ("/counter" page) and back to index page ("/" page) lets say 20x animation is really freezing and maybe after 27x it takes 20s to even render animation. Also my CPU went 12% up and RAM 120MB after those 27x (checked in Task manager). I was trying to use dev tools but as newbie it was pretty worthless. I can see rive library is taking biggest memory cost. Also my code has Dispose implemented (see below).
My question is: is it something I am doing wrong or should I file new issue on rive repo or maybe asp.net?
Index.razor:
Index.razor.js:
index.html:
<script src="https://unpkg.com/@rive-app/canvas@1.0.97"></script>
and the web app: https://laftek.github.io/BlazorApp1/
Thank you.