#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):

https://codereview.adblockplus.org/29447555/

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.

Change History (3)

comment:1 Changed 14 months ago by sergz

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 14 months ago by abpbot

A commit referencing this issue has landed:
Issue 5275 - Minimize memory usage as soon as possible

comment:3 Changed 14 months ago by sergz

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.