Opened 20 months ago

Closed 20 months ago

Last modified 19 months ago

#6466 closed change (fixed)

Make creating of AdblockEngine asynchronous

Reported by: asmirnov Assignee:
Priority: P2 Milestone:
Module: Adblock-Plus-for-Chromium Keywords:
Cc: Blocked By: #6485, #6489, #6500
Blocking: Platform: Android
Ready: no Confidential: no
Tester: Rraceanu Verified working: yes
Review URL(s):

https://gitlab.com/eyeo/adblockplus/chromium/merge_requests/9

Description

Background

FilterEngine is created for few seconds (#4432) and the main thread is locked until it's finished.
This becomes irritating starting the 2nd app launch (on the first app launch the filters are not yet downoaded) on relatively slow android devices.

If we do it synchronously (at the moment) it takes few seconds to launch Chromium app and the app looks frozen. If we do it asynchronously the user will be able to start navigating webpages and still see ads while FilterEngine is not yet created.

Both provide not perfect UX and we're having few solutions for that.
However during the meeting we've decided to make it asynchronous as temporary solution for now.

What to change

We need to make AdblockEngine creation asynchronous instead of synchronous. Probably this can be done in android or c++ side.

Change History (7)

comment:1 Changed 20 months ago by asmirnov

  • Blocked By 6485 added

comment:2 Changed 20 months ago by asmirnov

  • Blocked By 6489 added

comment:3 Changed 20 months ago by asmirnov

  • Blocked By 6500 added; 6485 removed

comment:4 Changed 20 months ago by asmirnov

  • Blocked By 6485 added

comment:5 Changed 20 months ago by asmirnov

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

comment:6 Changed 20 months ago by asmirnov

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

comment:7 Changed 19 months ago by rraceanu

  • Tester changed from Unknown to Rraceanu
  • Verified working set

Change verified, Engine is created asynchronously.

32054-32220/org.chromium.chrome W/SingleInstanceEngineProvider: Waiting for lock

32054-32220/org.chromium.chrome D/SingleInstanceEngineProvider: Creating adblock engine ...
32054-32162/org.chromium.chrome W/chromium: [WARNING:chrome_network_delegate.cc(307)] Adblock: OnBeforeStartTransaction
32054-32162/org.chromium.chrome W/chromium: [WARNING:chrome_network_delegate.cc(316)] Adblock: isAdBlockEnabled = true, FilterEngine ptr = 0
32054-32162/org.chromium.chrome W/chromium: [WARNING:chrome_network_delegate.cc(322)] Adblock: loading url http://assets.adobedtm.com/2f39014c5d5172df150d19eb00fe42ddba079437/scripts/satellite-599c0bc664746d1a0e001d8c.html
32054-32162/org.chromium.chrome W/chromium: [WARNING:chrome_network_delegate.cc(411)] Adblock: exiting OnBeforeStartTransaction()
32054-32054/org.chromium.chrome W/cr_ChromeTabbedActivity: Adblock: Notify C++ FilterEngine is created (passing pointer) -1123266352
32054-32054/org.chromium.chrome W/chromium: [WARNING:adblock_bridge.cc(352)] Adblock: set FilterEngine instance -1123266352
32054-32162/org.chromium.chrome W/chromium: [WARNING:chrome_network_delegate.cc(307)] Adblock: OnBeforeStartTransaction
32054-32162/org.chromium.chrome W/chromium: [WARNING:chrome_network_delegate.cc(316)] Adblock: isAdBlockEnabled = true, FilterEngine ptr = -1123266352
32054-32162/org.chromium.chrome W/chromium: [WARNING:chrome_network_delegate.cc(322)] Adblock: loading url http://samsungrum.beusable.net/script/b170105e175055u968/56e427737d
32054-32162/org.chromium.chrome W/chromium: [WARNING:chrome_network_delegate.cc(332)] Adblock: casted to AdblockPlus::FilterEnginePtr, use_count = 3
32054-32162/org.chromium.chrome W/chromium: [WARNING:chrome_network_delegate.cc(339)] Adblock: resource type of http://samsungrum.beusable.net/script/b170105e175055u968/56e427737d is 3 (isImage = false)
32054-32162/org.chromium.chrome W/chromium: [WARNING:chrome_network_delegate.cc(350)] Adblock: Referrer = http://www.samsung.com/de/mobile-content-page/
32054-32162/org.chromium.chrome W/chromium: [WARNING:chrome_network_delegate.cc(356)] Adblock: invoking IsDocumentWhitelisted(http://samsungrum.beusable.net/script/b170105e175055u968/56e427737d) 32054-32162/org.chromium.chrome W/chromium: [WARNING:chrome_network_delegate.cc(395)] Adblock: mapped to adblock content type 2
32054-32162/org.chromium.chrome W/chromium: [WARNING:chrome_network_delegate.cc(411)] Adblock: exiting OnBeforeStartTransaction()

Note: See TracTickets for help on using tickets.