vejobuj / greasefire

Automatically exported from code.google.com/p/greasefire
0 stars 0 forks source link

Performance issue and a suggestion (make current-page database lookup lazy) #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

this (anonymous) function shows up as a major culprit in the output of XUL
profiler:

    search: function(aUrl, aMatches, aFirstOnly, aExcludes) {
        this._search(aUrl, 0, 0, 0, aMatches, aFirstOnly, aExcludes);
    },

I wasn't actually doing anything with Greasefire during the profiling.

My guess would be that Greasefire eagerly looks up the current page in the
database (Btw, you did a commendable job regarding privacy by having the
database be mirrored locally!). I'll assume that this is indeed the problem.

The alternative approach would be to only do the lookup if and when the
user opens the Greasefire menu.

I realise that this would come at the cost of the icon telling you whether
there are any scripts on the current side. IMHO the performance cost is
serious enough to warrant the loss of that feature, but luckily, we could
have it both ways by just making it a configuration option ;)

Original issue reported on code.google.com by willthin...@googlemail.com on 10 Mar 2010 at 9:18

GoogleCodeExporter commented 9 years ago
Another would be, if the database would be updated as a list in AdBlock. It 
would be enough to update the lists of URLs every restart of the browser 
(whatever) in ordet to make the button shinny.
As you suggest, the proper look up (and be fully up to date) could be done 
whenever the button is indeed clicked.

The privacy remark is something I absolutely agree on.

Original comment by jorgu...@googlemail.com on 25 Jun 2010 at 4:02