Closed openaphid closed 1 year ago
good idea, I will probably work on this, thanks
@openaphid I found a bug while comparing query method against xpath and discovered the performance hit was from normalize() of every text element on the page, regardless of whether anything was spliced. if you clone or download this repo, you can Load Unpacked 2.26 and it should be way more performant, something like 2000x faster
I might still add the delay idea, but see https://github.com/neaumusic/selection-highlighter/issues/22 for page freeze test..
I'm gonna close this one! I made some drastic performance improvements for chrome, using the Highlight API to highlight text, and a single canvas to draw the markers. Regex is still a bit expensive on large documents, but not nearly as much as DOM manipulations.
Just submitted v3.0.0 to the chrome store, let me know if anyone has issues, seems to work ok in the stress test
For large documents like editing a source file on Github, the page would freeze when trying to select and delete some texts. It would be helpful to have an option to specify a delay to highlight when selection is changed.