Remove ast/resources after building a locale

RESOLVED WORKSFORME

Status

L20n
JS Library
P4
normal
RESOLVED WORKSFORME
5 years ago
3 years ago

People

(Reporter: gandalf, Unassigned)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
We currently store AST and resources loaded into memory forever.

We probably can free that memory after we compiled a locale
(Reporter)

Comment 1

5 years ago
Created attachment 755723 [details] [diff] [review]
POC

The difference on settings app:

explicit: 9.76MB vs. 8.22MB
RSS: 28.75MB vs. 27.02MB
PSS: 19.12MB vs. 17.39MB
VSB: 78.99MB vs. 80.18
Attachment #755723 - Flags: review?(stas)
Blocks: 802857
Comment on attachment 755723 [details] [diff] [review]
POC

Review of attachment 755723 [details] [diff] [review]:
-----------------------------------------------------------------

Looks like a simple change, r=me.
Attachment #755723 - Flags: review?(stas) → review+
Priority: -- → P4
I came across an article about heap profiling with Chrome DevTools, pretty useful: https://developers.google.com/chrome-developer-tools/docs/heap-profiling

Using the heap profiler I was able to confirm that the Resource objects get garbage collected with the patch.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.