Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 10540013: Proof of concept: Use a single FilterEngine instance (Closed)

Created:
May 3, 2013, 3:58 p.m. by Felix Dahlke
Modified:
Nov. 12, 2013, 10:10 a.m.
Visibility:
Public.

Description

This is a proof of concept I want to discuss, not code I want to commit. It needs cleanup/refactoring, leaks memory and seems to hang on larger sites (e.g. heise.de). But it generally works, e.g. here: http://simple-adblock.com/faq/testing-your-adblocker/ Previously, each process had it's own FilterEngine instance. This is still the case, but FilterEngine::Matches() is now always called on the same instance, using IPC. I'm using WM_COPYDATA for this because it seems to be the best approach without requiring admin rights, but the downside is that we have to do manual marshalling. The marshalling should probably be more generic by allowing arbitrary data (not just strings) and prefixing each value with it's length (as opposed to using 0 as a delimiter). What do you think, should we go ahead with this? The next thing I'll do is investigate why it's slow/hanging for larger sites.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+188 lines, -18 lines) Patch
M Shared/AdblockPlusClient.h View 2 chunks +4 lines, -0 lines 0 comments Download
M Shared/AdblockPlusClient.cpp View 2 chunks +183 lines, -16 lines 0 comments Download
M Shared/PluginFilter.cpp View 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 6
Felix Dahlke
May 3, 2013, 4 p.m. (2013-05-03 16:00:50 UTC) #1
Oleksandr
I am thinking it would indeed be too slow if we Marshall/Unmarshall and send messages ...
May 4, 2013, 2:40 a.m. (2013-05-04 02:40:02 UTC) #2
Felix Dahlke
On 2013/05/04 02:40:02, Oleksandr wrote: > I am thinking it would indeed be too slow ...
May 4, 2013, 2:49 a.m. (2013-05-04 02:49:46 UTC) #3
Wladimir Palant
I don't see why DCOM would mean less overhead, it's only a question of complexity. ...
May 4, 2013, 2:40 p.m. (2013-05-04 14:40:49 UTC) #4
Oleksandr
On 2013/05/04 14:40:49, Wladimir Palant wrote: > I don't see why DCOM would mean less ...
May 4, 2013, 3:01 p.m. (2013-05-04 15:01:37 UTC) #5
Wladimir Palant
May 5, 2013, 10:33 a.m. (2013-05-05 10:33:18 UTC) #6
On 2013/05/04 15:01:37, Oleksandr wrote:
> Matches() will slow down every request we detect.

Performance of web request performance is typically network-bound, pretty much
never CPU-bound.

Powered by Google App Engine
This is Rietveld