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

Fix that in-page search is very slow in Chrome #24

Open
tanius opened this issue May 31, 2019 · 2 comments
Open

Fix that in-page search is very slow in Chrome #24

tanius opened this issue May 31, 2019 · 2 comments
Assignees
Labels
later ngi-forward Affects the NGI Forward Platform branch only.

Comments

@tanius
Copy link
Member

tanius commented May 31, 2019

Tested in Chrome 73 under Linux. When searching for words in the page using the standard Ctrl + F search box, both search and the display of search results is very slow. It took 10-20 s here.

It seems that the JavaScript animation is interfering with the (probably likewise JavaScript based) in-page search. This is not an issue with all these JavaScript particle animations but possibly just a configuration issue, as it does not happen over at the OpenVillage website.

@tanius
Copy link
Member Author

tanius commented Jun 7, 2019

Reportedly not an issue in Chrome under Mac OS X.

@tanius
Copy link
Member Author

tanius commented Jul 1, 2019

This turned out to be a performance-related issue introduced of triggered by the SingleFile browser extension.

When giving that extension access to the browser tab with a site that contains the particle animation and looking at the console in Web Developer Tools, there will be a message about SingleFile hooking the requestAnimationFrame method. And then >7 messages per second like this, all with timing values ≥50 ms:

    [Violation] 'requestAnimationFrame' handler took 97ms

When disabling access to such a site for SingleFile, Chrome's in-page search would work normal again and the message quoted above would not appear nearly as often (only sporadically, and this is admittedly a somewhat seasoned computer I'm working with).

So the in-page search dysfunction is not an issue that will be seen by many people – only by those that also have SingleFile or other interfering extensions installed, and by those with an even slower computer.

Still, technically this is an issue, as even in such slow environments the particle animation should not start to flood the browser's message bus system with all this 'requestAnimationFrame' handler took … stuff – which is probably what interferes with the in-page search function. It should instead simply decrease the targeted framerate from 1000 ms / 50 ms = 20 fps to a lower value that can be managed by the computer.

At the least we should report this upstream to the particle animation project we're building on.

@tanius tanius added the ngi-forward Affects the NGI Forward Platform branch only. label Sep 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
later ngi-forward Affects the NGI Forward Platform branch only.
Projects
None yet
Development

No branches or pull requests

2 participants