-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wasm: Performance problems in Firefox #182
Comments
Firefox memory stats for compilation with web worker:
|
To check:
|
Yeah the seem to be based on the same javascript file. So they are instances of the same thing. 14GB of RAM usage for the first one seems to be a bit extreme. Maybe, just maybe we are lucky and just something went wrong with the first one and the second one does the right thing. 2GB of RAM seems more realistic.
Yeah that seems to be the big chunk: |
The second one is not used,. The allocations of the first one are changing during compilation. |
Remember how bun runs into some allocation error for the element table? Maybe it is related? Like it is not actual memory allocations but something goes wrong with the element table? As it seems to be the same memory area. Just a hunch. Because it seems very unlikely that the compilation would make so many allocations. We are not compiling a huge code base. Thats usually only of you lto a huge code base. Could also be a memory leak in a tight loop. |
Can you compare memory usage to Chrome? Would be interesting if it uses less RAM on Chrome or if Chrome just allows more RAM. |
In the case of Chrome, we have also two compilation workers, each consuming 2.1GB of memory. Out of this, 1.9GB is allocated to WASM Memory (ArrayBuffer). In Firefox, the first compilation always seems to pass, resulting in memory consumption similar to Chrome. However, on the next compilation, memory usage increases to 13.5GB for the compilation worker, with 12.1GB allocated to the ArrayBuffers. We are building revive with default WASM mem limit set to 2GB: |
I think seeing two workers is expected because |
We are running resolc in a worker, so if resolc makes a recursive call, it is executed within this worker. The original Remix code also has two workers with soljson compiler. |
So tl;dr: The memory usage balloons only on Firefox? Because 12GB of mem usage would also not go well with Chrome I suppose. |
yes, on Firefox only.
|
It was observed that Firefox fails to compile contracts that compile fine in other Browsers. Likely due to memory pressure
The text was updated successfully, but these errors were encountered: