Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • sun 403 posts 395 karma points
    Aug 13, 2011 @ 12:11
    sun
    0

    Why is XSLTsearch Extension loaded with every xslt macro?

    I use umbraco debug+trace mode to see what happen, and I noticed that XSLTsearch Extension will be loaded when each xslt macro be loaded.

    I think this is not right, because I havn't used XSLTsearch with that page, so I needn't to load XSLTsearch Extension.

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Aug 13, 2011 @ 15:05
    Lee Kelleher
    0

    Hi sun,

    All registered XSLT extensions (either via the config or using the class attribute) are loaded in for every macro (that uses XSLT). You'' notice these in the trace information (marked with "umbracoXsltExtension").  I wouldn't worry too much about it, the performance cost of initialising the class objects is very small.

    I do understand your point that if it's not being used in that XSLT, then why load it?  The alternative is for the macro to parse the XSLT, check if it is being used, then load it (lazy loading) ... this would incur a bigger performance hit (due to the parsing).

    Cheers, Lee.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Aug 13, 2011 @ 15:22
    Douglas Robar
    1

    All XSLT extensions are automatically loaded into new macros just in case you want to use them. There is a very, very slight performance penalty as each loads but as you can see from the trace it is extremely small. 

    cheers,
    doug. 

     

     

Please Sign in or register to post replies

Write your reply to:

Draft