Open dhowe opened 7 years ago
Can you explain more about what you mean by "a single Ad is discovered 3 times" ?
When I check the example page with debugging mode. This is what I see from the console:
In this case, two nodes have been processed, the tag and the tag. Though it is the same ad, but different nodes...
Looks like you are finding two (of the same) ads, when I tested before I was finding three (two duplicates), now I also see two ...
But the point is that once we examine a node, there is never a point in examining again, unless the DOM has changed, so we might, in the future, want to mark nodes as 'checked', so as not to revisit...
On hold for now
We often look process the same DOM element multiple times (in parser.js) when it is hit by multiple cosmetic filters. A simple example is this page: http://lab-lamp.scm.cityu.edu.hk/adntest/redirect-notice.html, where a single Ad is discovered 3 times (the last two are marked correctly as duplicates and ignored). But we may get some page-load speed gains (at the possible expense of memory) by keeping track of nodes we have looked at and not re-parsing them...
Testing this will requires profiling with and without
see #551