If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

When profiling from startup on, Firefox takes up huge amounts of memory on shutdown

NEW
Unassigned

Status

()

Core
Gecko Profiler
4 years ago
4 years ago

People

(Reporter: Gijs, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

STR:

1. Set profiling env vars:
MOZ_PROFILER_STARTUP=1
MOZ_PROFILER_SHUTDOWN=deleteme.profile

2. Start Firefox
3. Open 4 empty tabs for a total of 5
4. Quit Firefox

On Win7, I'm seeing memory usage of over 300MB.

When running for about ~2.5 minutes (with a larger profile buffer), writing the profile on OS X made Firefox use 3.5GB of RAM.

I understand that we have to keep things in memory, and then write them, but this seems a bit excessive.
How much is a larger profile buffer? The JSON representation is very large and redundant compared to the binary format. I'm talking about KBs to MBs, so roughtly x100-x1000 times.
(In reply to Benoit Girard (:BenWa) from comment #1)
> How much is a larger profile buffer? The JSON representation is very large
> and redundant compared to the binary format. I'm talking about KBs to MBs,
> so roughtly x100-x1000 times.

10 times the normal size. Even if the JSON representation is very large, can we make it not load the entire representation in memory, and stream the output instead?
You need to log in before you can comment on or make changes to this bug.