You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2ZeroSix opened this issue
Apr 3, 2025
· 2 comments
Assignees
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.P2A bug or feature request we're likely to work ontriagedIssue has been triaged by sub team
Something similar happened here #54886, but then we found a workaround right away.
This time I couldn't localize the problem, and don't see any easy solutions besides disabling compressed pointers completely.
error from flutter build:
Exhausted heap space, trying to allocate 65584 bytes.
Error: Out of memory
At first, the error occurred during refactoring of a large module into a separate package, at some point refactoring introduced a lot of cycles with long export-import chains, but as soon as we got rid of them the problem disappeared.
We postponed actual investigation for a while, and now it's happening on our main branch.
I'm almost sure there is some problem with our exports overusage, but I'm not sure how to find what exactly is consuming all the memory.
I've tried --trace_timeline --timeline_recorder=file --timeline_streams=all --timeline_dir=$(pwd) but it just produced an empty file.
I couldn't reproduce it without internal code yet, so I don't know if this is still an issue in the main sdk branch.
Workaround
Same as in previous issue, error goes away when excluding excess code from the build.
Our current hotfix is to exclude one large module that wasn't yet enabled in production.
The text was updated successfully, but these errors were encountered:
2ZeroSix
added
the
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
label
Apr 3, 2025
Another problem that I noticed is that imports are not being properly "tree-shaken", which massively increases the size of the app.dill and probably slows down and increase memory footprint of gen_snapshot. I will gather some examples and create a separate issue for this.
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.P2A bug or feature request we're likely to work ontriagedIssue has been triaged by sub team
Something similar happened here #54886, but then we found a workaround right away.
This time I couldn't localize the problem, and don't see any easy solutions besides disabling compressed pointers completely.
error from
flutter build
:trace
local unopt profile build from these commits
engine: flutter/engine@3.19.6...2ZeroSix:engine:ee0d52dd5f559d8500e3e2bc230b41f074dd8848
sdk: 3.3.4...2ZeroSix:sdk:0fe1ac45725932b52d8803c9064513c96ba32efe
At first, the error occurred during refactoring of a large module into a separate package, at some point refactoring introduced a lot of cycles with long export-import chains, but as soon as we got rid of them the problem disappeared.
We postponed actual investigation for a while, and now it's happening on our main branch.
I'm almost sure there is some problem with our exports overusage, but I'm not sure how to find what exactly is consuming all the memory.
I've tried
--trace_timeline --timeline_recorder=file --timeline_streams=all --timeline_dir=$(pwd)
but it just produced an empty file.xctrace gave some information
Steps to reproduce
I couldn't reproduce it without internal code yet, so I don't know if this is still an issue in the main sdk branch.
Workaround
Same as in previous issue, error goes away when excluding excess code from the build.
Our current hotfix is to exclude one large module that wasn't yet enabled in production.
The text was updated successfully, but these errors were encountered: