brandon1024 / find

A find-in-page extension for Chrome and Firefox that supports regular expressions.
https://chrome.google.com/webstore/detail/find%2B-regex-find-in-page/fddffkdncgkkdjobemgbpojjeffmmofb
GNU General Public License v3.0
409 stars 53 forks source link

[Firefox] "Warning: Unresponsive add-on script" in large pages #339

Closed j1elo closed 3 years ago

j1elo commented 3 years ago

First of all, thank you very much for this extension! it is awesome and bring a sorely lacking functionality to the browser's find function.

Issue Description

Warning: Unresponsive add-on script

A script from the extension “find+ | Regex Find-in-Page Tool” is running on this page, and making Firefox unresponsive.

It may be busy, or it may have stopped responding permanently. You can stop the script now, or you can continue to see if it will complete.

Script: moz-extension://13e262fc-7492-…fb2643c083f5/content/parser.js:0

The Firefox script execution limits seem to be fairly low, so this extension will trigger the warning dialog as soon as the page is a bit large. This issue renders the extension unusable for these pages, because the dialog will re-appear just 3 to 5 seconds later.

Steps to Reproduce

Screenshots and Documentation

image

Firefox version: 85.0 OS: Ubuntu linux

Workaround

Giving more time to the extension will work around the issue, although ideally it shouldn't be needed:

Comments

Are there maybe any low hanging fruits to improve the performance of the internal regex engine? As right now it seems to be quite slow given that the test page is purely static text and the amount of text is not really that much.

sakyb7 commented 3 years ago

Im also getting the same issue chrome and firefox both every time im using this extension... OS: Ubuntu 20.04 findIssue

brandon1024 commented 3 years ago

@j1elo @sakyb7 Thanks for your interest in Find+!

Unfortunately this is a known issue and my hands are tied. I've put a lot of work into trying to optimize the parsing and searching logic as much as possible, but I'm kinda at the limitation of what kind of computation you can do in a chrome extension. The logic for searching text in pages is really complex, it's not very easy to do.

For huge pages, I recommend using other tools (grep, for example). See further: https://github.com/brandon1024/find/issues/310