[rekonq] Review Request 111712: Load adblock settings in background

Commit Hook null at kde.org
Tue Jul 30 19:55:06 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111712/
-----------------------------------------------------------

(Updated July 30, 2013, 7:55 p.m.)


Status
------

This change has been marked as submitted.


Review request for rekonq.


Description
-------

Load the adblock settings in background.

If you open rekonq and start typing immediately, there is a small lag (about half a second). This is caused by the AdBlockManager::loadSettings function reading the adblock rules. It is called with a one second delay to make the startup faster. With this patch, the function is called in a separate thread using QtConcurrent::run to eliminate the lag. 

To make this safe, the adblocker is enabled after the settings are loaded, which means, that the first site loaded could be partially with ads. But this is no change in behavior, as the adblocker in current master is disabled for a whole second. 

The only times this blocks now is in situations, where it is necessary that the settings are loaded (showSettings and addCustomRule), but I guess that no normal user will use those in under a second after startup :).


Diffs
-----

  src/adblock/adblockmanager.h 3d329ad 
  src/adblock/adblockmanager.cpp 51000a3 

Diff: http://git.reviewboard.kde.org/r/111712/diff/


Testing
-------

- compiles, loads settings
- fixes the lag


Thanks,

Paul Rohrbach

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/rekonq/attachments/20130730/696ed140/attachment.html>


More information about the rekonq mailing list