Opened 2 years ago

Last modified 2 years ago

#6299 closed change

Avoid main thread lock on URL loading — at Version 1

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

https://codereview.adblockplus.org/29677555/

Description

Background

In issue #6265 we've optimized locking in order to avoid ANR (since AdblockEngine is now creating on background thread). However we can't start using it and it happens in startAbpLoading(...) in main thread:
https://github.com/adblockplus/libadblockplus-android/blob/master/libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java#L1125

We can go further and waitForReady() in background threads. For this we have to move domain request from main thread to background thread https://github.com/adblockplus/libadblockplus-android/blob/master/libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java#L1127 and wait for engine in shouldInterceptRequest as it happens on background thread too.

What to change

Replace this text with the detailed description of what exactly shall be changed/added and where.

Change History (1)

comment:1 Changed 2 years ago by asmirnov

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.