Skip to content

When/why does VM heap decrease? #51126

Closed
Closed
@jensjoha

Description

@jensjoha

I'm playing around with the analyzers memory usage.

Via #41793 (comment) I found and checked out https://github.com/kodecocodes/rwf-materials.git and opened the entire directory (after running flutter pub get 500+ times --- I don't know if there's a helper command but that's what I did anyway).

With an empty cache the memory usage goes to (on my machine) ~14GB.

Now comes a hack: I've found that creating a file and deleting it again makes the analyzer clear some (unneeded) cache stuff (and do all kinds of stuff again, but still) --- once it's done the memory usage is now ~11GB, but the used heap is in the ~3.5GB range. Doing the same thing again makes the memory usage go to ~9GB and the heap usage is still in the ~3.5GB range (e.g. it's displayed as heap 3.49GB of 9.13GB in Observatory).

So: Why doesn't the VM reduce the heap size further? Is there something else that has to be satisfied for it to reduce the heap or something?

/cc @mkustermann @mraleph

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.vm-gcRelated to the VM's garbage collector

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions