[Typo3-dev] Heavy use of stdWrap -> speedproblem

Alexander Langer alex at big.endian.de
Sun May 23 12:51:38 CEST 2004


Hi!

I just wrote an frontend-plugin that calls $this->cObj->stdWrap()
approx. 4500 times (sic!) [1].  Profiling shows, that stdWrap() is the bottleneck,
and indeed the page takes 10 seconds to render on a 2.5 GHz class PC.
This is defenitely too slow.

Some more information:  I use a template file with markers/subparts.  So
eventually up to 4500 markers might occur in the template, all of them
are wrapped with stdWrap().   As substituteMarkerArrayCached() doesn't
know about the to-be-wrapped before calling it, I need to fill the
subparts and marker arrays with all possible values - thus so many
stdWrap calls.

Any ideas to improve speed?  There really are 4500 different items that
need to be wrapped, so I can't do some internal caching, I'm afraid.

I still can add a new typoscript entry that lists the used markers, and
only fills the subpart array for those markers, but this seems odd to
me.

I could think of a substituteMarkerArray() function that backcalls a
marker-array filling function once it reaches a "###".  Anyone did that
before?

Thanks

Alex

[1] more to come, this is just a pre-version *sigh*





More information about the TYPO3-dev mailing list