Opened 3 years ago

Closed 3 years ago

#6299 closed change (fixed)

Avoid main thread lock on URL loading

Reported by: asmirnov Assignee:
Priority: P2 Milestone:
Module: Libadblockplus-Android Keywords:
Cc: Blocked By: #6265
Blocking: Platform: Android
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by asmirnov)


In issue #6265 we've optimized locking in order to avoid ANR (since AdblockEngine is now creating on background thread and on AdblockWebView request). However we can't start using it and it happens in startAbpLoading(...) in main thread:

We can go further and waitForReady() in background threads. For this we have to move domain request from main thread to background thread and wait for engine in shouldInterceptRequest as it happens on background thread too.

What to change

Move domain request to background thread (elemhide thread), waitForReady in background threads only.

Change History (5)

comment:1 Changed 3 years ago by asmirnov

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

comment:2 Changed 3 years ago by asmirnov

  • Description modified (diff)

comment:3 Changed 3 years ago by asmirnov

  • Description modified (diff)

comment:5 Changed 3 years ago by asmirnov

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