Open aalcott14 opened 3 days ago
@aalcott14 fetching the WASM module should occur only once, even within a worker, as you mentioned, since all dotLottie instances created by workers share the same memory.
~The only exception is if you're using the workerId
prop, which allows you to group animations into separate workers. Is that the case ?~
reproducible on the perf-test page
Hi @theashraf, thanks for taking a look! Yes, as you can see on the perf test page, this issue becomes quite problematic from a performance perspective as the requests pile up
Overview
I'm attempting to use
DotLottieWorkerReact
and use thesetWasmUrl
method to retrieve the wasm file from my own server rather than the public CDN (for security purposes). It seems to work except that the fetch to the wasm url gets made for every single animation rather than a single fetch, like what occurs ifsetWasmUrl
is not invoked and defers to the CDN.I'm wondering what is causing the fetch to get made subsequent times when this does not occur without the use of
setWasmUrl
.Only a single fetch occurs when using
DotLottieReact
component instead ofDotLottieWorkerReact
Here's an example of my code:
...
Labels
Type: Bug
label to this issue.