WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
300780
[JSC][IPInt] High peak-memory footprint during module compilation compared to other engines
https://bugs.webkit.org/show_bug.cgi?id=300780
Summary
[JSC][IPInt] High peak-memory footprint during module compilation compared to...
Yuta Saito
Reported
2025-10-15 02:48:14 PDT
Created
attachment 477082
[details]
minimum reproducible code We've observed that JavaScriptCore uses more memory during Wasm module compilation compared to other engines in our testing, especially for large Wasm modules. This appears to be related to IPInt metadata generation, and I wanted to share our findings in case this is helpful for optimization efforts. During the module compilation stage in our test case (63 MB Wasm module) on macOS - WebKit: 516MB - Chrome: 249MB - Firefox: 379MB WebKit's memory usage is higher than the other engines we tested, and it more frequently crashes in our testing. Based on our quick profiling, it seems that IPInt metadata generation involves substantial memory allocations. Our application has many cold functions, so the current approach of eagerly creating metadata for all functions might be using more memory than necessary for such cases. We are also working on reducing our application's module size on our end, but it would be very helpful if there were improvements on the JSC side to mitigate this kind of case. ## Reproduction WebKit Revision: 9de90808501f5acc03eb550000f69af0d9f78093 $ npx serve ./bugs-webkit-org-ipint-footprint $ ./Tools/Scripts/run-minibrowser --release -- "
http://localhost:3000
" $ xctrace record --template "Allocations" --attach <WebContent.Development PID> $ # Click "Compile it" button on the page $ # Terminate the recording process
Attachments
minimum reproducible code
(20.25 MB, application/x-gzip)
2025-10-15 02:48 PDT
,
Yuta Saito
no flags
Details
Attach_93360_2025-10-15_19.21.23_C5822548.trace.zip
(87.84 MB, application/zip)
2025-10-15 03:25 PDT
,
Yuta Saito
no flags
Details
minimum reproducible scripts
(20.25 MB, application/x-gzip)
2025-10-15 04:08 PDT
,
Yuta Saito
no flags
Details
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Yuta Saito
Comment 1
2025-10-15 03:25:04 PDT
Created
attachment 477083
[details]
Attach_93360_2025-10-15_19.21.23_C5822548.trace.zip
Yuta Saito
Comment 2
2025-10-15 04:08:00 PDT
Created
attachment 477084
[details]
minimum reproducible scripts Added another JS script so that we can reproduce it with a standalone JSC: $ cd /path/to/bugs-webkit-org-ipint-footprint $ env DYLD_FRAMEWORK_PATH=/path/to/WebKitBuild/Release /path/to/WebKitBuild/Release/jsc --footprint ./test.jsc.js
Radar WebKit Bug Importer
Comment 3
2025-10-22 02:49:11 PDT
<
rdar://problem/163177683
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug