Closed Basti-an closed 5 years ago
Hi Basti-an,
I already had the same idea, I don't like it either. The whole node looping stuff, was forked from the original repo though and I didn't quite bother it for this fun little project.
So, yes please, I'd appreciate your help.
Grüße aus Köln zurück!
I started fiddling around in the branch called "perf":
https://github.com/voodoocode/pannengeraet-krank-knarrenbauer/blob/perf/content.js
I already merged that to master, so it should be a bit better now
Hey Voodoo,
unfortunately, the Extension is not performant because you unconditionally iterate over all DOM nodes on all pages.
if you were to get the whole innerHTML (document.getElementsByTagName('html')[0].innerHTML) of the page first and do a regex search for AKK etc. first to determine wether there even are any textnodes to replace, you could save tons of CPU-cycles.
If you would like to, I could create a pull request and do some performance profiling.
Beste Grüße aus Köln