Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greasemonkey 1.6 freezes #1689

Closed
Zack-od-Bins opened this issue Jan 16, 2013 · 15 comments
Closed

Greasemonkey 1.6 freezes #1689

Zack-od-Bins opened this issue Jan 16, 2013 · 15 comments
Milestone

Comments

@Zack-od-Bins
Copy link

Since this update 1.6 I've gotten browser crashes in Firefox 18 at every load of webpages.
There haven't been updates for other add-ons at the time of this update nor after it.
I had to completely disable Greasemonkey.
I'm not really sure what other info I could or should provide here.
This is my first post at GitHub.
Cheers.

@arantius
Copy link
Collaborator

http://wiki.greasespot.net/Troubleshooting_(Users)

Especially fresh profile. Perhaps try disabling all scripts first, does that help? If so, enable them one by one to see which causes it.

@Zack-od-Bins
Copy link
Author

It seems when I disable Google Hit Hider by Domain, Greasemoney no longer crashes FF.
Do I need to report the problem to the maker then ?

@arantius
Copy link
Collaborator

We're talking about http://userscripts.org/scripts/show/95205 ?

A script should never be able to crash Firefox, so if that's really happening, it's definitely something we should look into.

@Zack-od-Bins
Copy link
Author

Yes, that is the script I am referring to.
I've been using it for two years now.
It has never given me any trouble before.
Only since the most recent Greasemonkey update.

@Ventero
Copy link
Contributor

Ventero commented Jan 16, 2013

The problematic commit seems to be 1250bd7 - a build with that commit reverted does not result in any noticeable hangs (which apparently is meant by "crashes"). The reason is probably that the linked script uses quite a lot of @includes and @excludes with the magic .tld suffix, so that GM takes a lot of time when trying to match those includes against the current URL.

@Zack-od-Bins
Copy link
Author

I'll clarify what I meant.
By "crashes" I mean that Firefox stops responding, otherwise said: freezes.

@arantius
Copy link
Collaborator

Back in issue #1351 where this was added, I specifically did timing on the impact of such a big regex. And I got tiny fractions of milliseconds. But multiple people have filed "reviews" at AMO rather than bug reports here already, so this is obviously a serious issue.

Plus the AMO review of 1.6 said:

If you're going to use the public suffix database for your TLD checks, please do so via the nsIEffectiveTLDService rather than including a separate copy of the DB in regex form in your extension.

Maybe rather than substituting a big regex in place of .tld, we should detect its presence, find the actual TLD of the current URL (via nsIEffectiveTLDService), and substitute that into the pattern.

@AlienHeads
Copy link

I'm having the same problem, it happens with all scripts disabled. I don't even have to try to load a page, as soon as i try to click anything with the greasemonkey icon FF stops responding i.e. clicking the monkey to enable/disable or the arrow for options.

I've gone back to using version 1.5 & that works fine.

@arantius
Copy link
Collaborator

Confirmed. First I installed ten scripts which each mentioned .tld once. I got a tiny pause that I couldn't possibly call a crash or a freeze, hardly noticable. I changed them each to have ten mentions of .tld (still times ten scripts) and I see a ~3 second pause to navigate/open the monkey menu. Which makes for a delay of something like 30ms per, way way more than the 0.02ms estimated in #1351.

@arantius
Copy link
Collaborator

Plan on pushing this build live some time today to fix the issue; I'd love confirmation from someone experiencing this bug that it really fixes things.

http://dl.dropbox.com/u/6784911/greasemonkey-1.7.xpi

@stefansp
Copy link

@arantius greasmonkey does not load any scripts with your version.

@arantius
Copy link
Collaborator

Thanks, just noticed and fixed 262ddf3 ; give it another shot if it's not too much trouble. Thanks.

@stefansp
Copy link

the new version fixes the freezes.

@AlienHeads
Copy link

Excuse my ignorance but where is the new version?

@Lekensteyn
Copy link
Contributor

1.7.1 (from git) is confirmed to work. I experienced sluggish behavior and initially blamed FF for this, but with a new profile it still occurred. Then I disabled some add-ons and it turned out to be GM. With random disabling GM scripts, I isolated one script out of it which had three .tld includes. This already slowed down the browser for less than a second (noticeable though).

Using a script containing 100 $i.example.tld includes, the browser would ask me to terminate GM after thirty seconds. The new 1.7.1 version solves this performance regression and the include is still working (tested excludes and includes).

(fyi, a test script that I have been running shows that Firefox 18 takes about 337ms where Chromium 24 is almost immediately done (0-5ms))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants