Sure, I’ll add some debugging stuff, at least, I’ll try to do so
I would call the speed increase rather significant, since it’s just comming from the parser’s find and replace snippets/chunck/etc routines!
Ehm, the home page of the modx install has a:
- DropMenu
- FlexSearchForm
- ListRelated
- Most Recent
Which add significant to the processing time! (the evaluating of those snippets I mean)
Also a number of [(yada)] and [*yada*] which is handled by the processTags funtion now too, but these don’t add much to the processing time.
Some parts of the processTags() can be unified/simplified if the calling convention would be like this:
Where T is a specific tag, and CODE the name of a snippet/chunk/etc with additional parameters(only for snippets).
So, this:
will become this:
A snippet remains the same, a chunk would be:
A placeholder:
So in processTags we check for first occurences of:
[[*
[[(
[[+
etc
[[
on a match, we substring the template until a ’]]’ is found, and feed that to the correct method.
and continue our recursive processTags();
In case of a snippet, the snippet parsing code checks for nested snippets, just like it is now.
What do you think?
Greetz,
Remon