Closed julianhofmann closed 1 year ago
Hi @julianhofmann,
thanks for your suggestion, I'll keep that in mind for the upcoming compatibility update when the v12 LTS arrives.
I remember this not beeing trivial to do with DOM Document, but it's been some years though and maybe is some technical debt caused by a lack of experience years ago. But normally the hook should run on non cached requests only, so if your page is cached the parser won't run anyway.
Greetings Daniel
Hi @julianhofmann,
this is now merged: 876c74abf72b77d23e65c3a5d7dc006878c0182c Thanks for your work.
Greetings Daniel
Currently, the extension is parsing always the whole DOM. All the
forbidden*
-properties only apply when the nodes are traversed and then excluded via XPath. On a page with a huge amount of tags/nodes (e.g. with a huge mega-menu or long side navigation) a number of loops are run through in order to ultimately not process the excluded tags.IMO a way cleaner and more performant way would be, to only parse the relevant part of a page. Mostly, you have already some kind of wrapper around your content and only this content is relevant to the glossary. So, we could take only this node for parsing.
A proof-of-concept for that feature has lowered the rendering time of a page (1500 terms, 2800 synonyms) from 9,5s to only 3.7s (All caches have been flushed before).