Whitelist Options GUI suggestion?

Bug reports and enhancement requests
Post Reply
barbaz
Senior Member
Posts: 11068
Joined: Sat Aug 03, 2013 5:45 pm

Whitelist Options GUI suggestion?

Post by barbaz »

With all these reports of long whitelists causing the browser to hang when opening Options, and then seeing this post... it occurred to me, would the hanging issue be mitigated at all by using a custom nsITreeView to display the whitelist instead of a listbox? Because an nsITreeView only tries to display what's visible (rather than trying to display all data), and Adblock Plus subscriptions, which could easily be tens of thousands of entries, are viewed by custom nsITreeView and don't exhibit a similar issue...
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:32.0) Gecko/20140924 SeaMonkey/2.29.1pre
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Whitelist Options GUI suggestion?

Post by Giorgio Maone »

It's been in my TODO list for a long time now, but never got the time and patience for it (nsITreeView's API is quite hairy).
Feel free to submit a patch, or I'm gonna try harder...
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
barbaz
Senior Member
Posts: 11068
Joined: Sat Aug 03, 2013 5:45 pm

Re: Whitelist Options GUI suggestion?

Post by barbaz »

Think I'll give it a try a bit later and let you know how it goes. I'll see if the nsITreeView implementations & utils I have in my own extensions can be adapted to fit NS.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20140618 Firefox/24.0 PaleMoon/24.6.2
barbaz
Senior Member
Posts: 11068
Joined: Sat Aug 03, 2013 5:45 pm

Re: Whitelist Options GUI suggestion?

Post by barbaz »

Looks doable so far but it will take some time, a few days at least. I'm working with NoScript 2.6.8.42rc3 as the base.
Also, given what happened last time I gave you a patch for the Options dialog, I'm not sure if I will be able to debug it for Fx 3.6.28...
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20140618 Firefox/24.0 PaleMoon/24.6.2
barbaz
Senior Member
Posts: 11068
Joined: Sat Aug 03, 2013 5:45 pm

Re: Whitelist Options GUI suggestion?

Post by barbaz »

OK, got the basic implementation working, just have to work out a few kinks and make sure it doesn't behave differently from before.

Why do you say nsITreeView is "hairy"?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20140618 Firefox/24.0 PaleMoon/24.6.2
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Whitelist Options GUI suggestion?

Post by Giorgio Maone »

barbaz wrote:Why do you say nsITreeView is "hairy"?
I just mean that albeit elegant, MVC and all, for the simplest use cases (like this) it usually forces you to write what may feel like an unnecessary amount of code.
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
barbaz
Senior Member
Posts: 11068
Joined: Sat Aug 03, 2013 5:45 pm

Re: Whitelist Options GUI suggestion?

Post by barbaz »

I didn't feel that there was a huge amount of needless code involved...

Anyway, patch sent by PM
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20140618 Firefox/24.0 PaleMoon/24.6.2
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Whitelist Options GUI suggestion?

Post by Giorgio Maone »

Thank you so much :)
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
barbaz
Senior Member
Posts: 11068
Joined: Sat Aug 03, 2013 5:45 pm

Re: Whitelist Options GUI suggestion?

Post by barbaz »

You're welcome.

Does that actually reduce or fix options hanging with really large whitelist in Gecko >= 31?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20140618 Firefox/24.0 PaleMoon/24.6.2
barbaz
Senior Member
Posts: 11068
Joined: Sat Aug 03, 2013 5:45 pm

Re: Whitelist Options GUI suggestion?

Post by barbaz »

Done in 2.6.9rc1, thanks. Hope it works better now :)
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:32.0) Gecko/20100101 SeaMonkey/2.29.1
barbaz
Senior Member
Posts: 11068
Joined: Sat Aug 03, 2013 5:45 pm

Re: Whitelist Options GUI suggestion?

Post by barbaz »

Oh, BTW, FYI, looks like a few spurious files made it in 2.6.9rc1 as a result of applying this patch:

Code: Select all

Only in ./noscript-2.6.9rc1.xpi_FILES/chrome/noscript/content/noscript: noscriptOptions.js.orig
Only in ./noscript-2.6.9rc1.xpi_FILES/chrome/noscript/content/noscript: noscriptOptions.js.rej
Only in ./noscript-2.6.9rc1.xpi_FILES/chrome/noscript/content/noscript: noscriptOptions.xul.orig
Only in ./noscript-2.6.9rc1.xpi_FILES/chrome/noscript/content/noscript: noscriptOptions.xul.rej
I don't see anything in the diff that references those...
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:32.0) Gecko/20100101 SeaMonkey/2.29.1
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Whitelist Options GUI suggestion?

Post by Giorgio Maone »

barbaz wrote:Oh, BTW, FYI, looks like a few spurious files made it in 2.6.9rc1 as a result of applying this patch:

Code: Select all

Only in ./noscript-2.6.9rc1.xpi_FILES/chrome/noscript/content/noscript: noscriptOptions.js.orig
Only in ./noscript-2.6.9rc1.xpi_FILES/chrome/noscript/content/noscript: noscriptOptions.js.rej
Only in ./noscript-2.6.9rc1.xpi_FILES/chrome/noscript/content/noscript: noscriptOptions.xul.orig
Only in ./noscript-2.6.9rc1.xpi_FILES/chrome/noscript/content/noscript: noscriptOptions.xul.rej
I don't see anything in the diff that references those...
I had to apply parts of the patch manually, and forgot to remove those files which resulted from automatic patching failure.
Removed now, thanks.
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
Post Reply