I'm looking at speeding up a component that just prints a large amount of <a> tags for a menu. Originally it took 70ms to generate this component which didn't make sense to me since this was just calling out.write() on a cached string. I disabled link checker in the component using the setIgnoreExternals and setIgnoreInternals methods and this got me down to around 15ms. This is much better but still accounts for almost half of our page generation time (locally). On a hunch i changed all of the <a href".."> tags to <span href=".."> and this dropped the generation time to 5ms. Is there anything else happening within CQ that would cause <a> tags to render slower than another tag? I'm using the CQ timing component to get the generation times.
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Actually I ran across this - http://www.wemblog.com/2011/10/how-to-make-sure-that-links-are-always.html. It might give you the behavior you are looking for.
Views
Replies
Total Likes
The change between <a href = to <span href= is a demonstration of what's happening. The Link Checker Transformer is parsing the HTML as it flushed to out and looking for a sub-set of tags (I think a, link, image, script maybe - there might be some others). When if finds a matching tag it then evaluates the attribute containing the link - the first thing it does is check value to see if it is internal or external. With your configuration you have prevented it from actually checking the link, but its still parsing the HTML, pulling the value out of the attribute and checking to see if it's external or internal.
What it sounds like you want to do is actually turn off the link checking entirely so that it doesn't even both parsing the HTML. I don't know if there is a way to do that on a component level - it's either on or off at a page level I believe.
Views
Replies
Total Likes
Actually I ran across this - http://www.wemblog.com/2011/10/how-to-make-sure-that-links-are-always.html. It might give you the behavior you are looking for.
Views
Replies
Total Likes
That makes perfect sense, thank you! I'll take a look at that link and see if configuring any of those settings will help.
Views
Replies
Total Likes