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

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.

Attachments (0)

Change History (3)

comment:1 Changed on 05/24/2017 at 12:17:18 PM by sergz

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

comment:2 Changed on 05/24/2017 at 01:44:49 PM by abpbot

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

comment:3 Changed on 05/24/2017 at 01:45:30 PM by sergz

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from sergz.
 
Note: See TracTickets for help on using tickets.