stsquad / emacs_chrome

A Chromium/Firefox "clone" of It's All Text for spawning an editor to edit text areas in browsers. Based on David Hilley's original Chromium extension.

Home Page:https://chrome.google.com/extensions/detail/ljobjlafonikaiipfkggjbhkghgicgoh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Edit with Emacs" is slowing down Firefox

wentasah opened this issue · comments

I'm getting the "Edit with Emacs" is slowing down Firefox message on a page with a big table (see below). On that site, Firefox UI is really unresponsive for a few seconds. Is there a way how to debug the problem?

I know very little about javascript, but my guess is that the for loop in findTextAreas executes for too long. If this is the case, would it be possible to split the loop to smaller pieces or execute is somehow in background, so that it doesn't block the UI?

edit-with-emacs-brute

Yeah I suspect this is a very heavy page to be doing a dumb iteration over all the elements. I suspect jQuery could come up with a better subset of elements to check through rather than testing their type in findTextAreas.

Could you try the current state of master and see if things have improved.

Yes, it has improved a lot. When I load the mentioned page, I don't notice any UI blocking. Thanks!

OK thanks for testing - this will roll into the next release.

Do you have any time plan for the release? I'm asking whether I should invest time to figuring out how to use an unsigned extension (development version) or just wait a few days for the release.

No immediate plan. I need to clean up the multi-browser handling (polyfill) and then figure out the publishing via my user account as I think @dakra has moved on from doing that side of things. Using the signed extension is not overly hard (although I had to jump through hoops on my Flatpak version of Firefox).

Right, I use a different package now. I'm happy to transfer the project to your account so users don't have to install a different extension and you keep the 5 star reviews ;)
Publishing was simple with web-ext. I can also do it one more time for you if you want.
But long-term, probably better if everything is in your hands.

Right, I use a different package now. I'm happy to transfer the project to your account so users don't have to install a different extension and you keep the 5 star reviews ;) Publishing was simple with web-ext. I can also do it one more time for you if you want. But long-term, probably better if everything is in your hands.

Ahh if you can transfer it to my Firefox id that would be great (it's also stsquad).

It needs an email. I tried your linaro address that you use for commits but it doesn't find you.

👍 done