Opened 2 years ago

Last modified 2 years ago

#6372 new change

FilterEngine method invocations take too long — at Version 1

Reported by: asmirnov Assignee:
Priority: P3 Milestone:
Module: Libadblockplus Keywords:
Cc: sergz, jwangenheim, diegocarloslima, fhd Blocked By:
Blocking: Platform: Android
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by asmirnov)


We're obviously using some filterEngine methods for ad blocking: GetHostFromURL(), IsDocumentWhitelisted, etc. in Chromium+ABP integration.

I've added invocations time logging to know how long it takes and sometimes it takes few seconds!
It means resource loading is blocked and the thread is just blocked. It seems to be fundamental limitation for our current design (JS code < C++ wrapper < Java wrapper) as we bring JS single-threaded nature into multi-threaded by nature applications.

BTW while loading of website a user can go to Settings. In order to show them we do invoke some FilterEngine methods, that due to JS nature are executed in same single thread. So either settings UI (main thread) or resource loading is blocked just because behind the scene it's invoked in the same thread.

What to change

Probably this can be solved by using Emscripten and avoid using JS code.

Change History (4)

Changed 2 years ago by asmirnov

Changed 2 years ago by asmirnov

Changed 2 years ago by asmirnov

comment:1 Changed 2 years ago by asmirnov

  • Cc sergz jwangenheim diegocarloslima fhd added
  • Description modified (diff)
Note: See TracTickets for help on using tickets.