-
Notifications
You must be signed in to change notification settings - Fork 660
Open
Labels
Description
In Toolbox we parse HUGE json. Once parsed, it allocates too much memory. Right now, the default ArrayList
is used, it allocates 10 elements, but most of the time it has zero or one element only. We have ~100k such arrays visible in the memory dump.
Suggestion
For read-only collections:
- use empty singletons for empty collections (e.g.,
EmptyList
) - use singleton implementations (e.g.,
SingletonMap
) for single-element collections. - trim collections with >1 elements.
ApoloApps