Opened on 05/24/2017 at 11:26:57 AM
Closed on 05/24/2017 at 01:45:30 PM
#5275 closed change (fixed)
Minimize memory usage as soon as possible
Reported by: | sergz | Assignee: | sergz |
---|---|---|---|
Priority: | P1 | Milestone: | |
Module: | Libadblockplus | Keywords: | |
Cc: | fhd, asmirnov | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description
Background
Some users, in particular on android platforms, ask to minimize the memory usage as soon as it grows, in particular soon after the engine is instantiated.
The implementation of v8 can compact the memory used by it however it seems the only semi-official way to force it is to notify the engine about critically low memory. The memory growth soon after the engine instantiation is caused by such heavy operations as asynchronous loading of subscriptions into the memory and saving them to a storage, so ideally we need to call GC at the end of each of such operations, however it turned out that we call saving to disk often enough, at least after each such manipulation with subscription, so we can attempt to compact the memory simply after saving to a disk.
What to change
Add method to notify about low memory usage and call it when save even is received from core.
A commit referencing this issue has landed:
Issue 5275 - Minimize memory usage as soon as possible