[TYPO3-core] RFC #8985: Enable USER object to become USER_INT on the fly

Dmitry Dulepov [typo3] dmitry at typo3.org
Thu Jul 17 11:07:59 CEST 2008


Hi!

Martin Kutschker wrote:
> Should be changed then. No need to load all libs unconditionally. A
> topic for typo3.performace :-)

Yes... I tried changing it but that will be a big change that I want to think more about. Just like with this USER_INT patch, it took lots of thinking.

tslib_cObj does not use t3lib_div::callUserFunction but its own callUserFunction. It cannot be easily changed to use t3lib_div's because they are incompatible in the way they handle parameters. And cObj's version does not accept EXT:-like syntax. Of course, code can copied from t3lib_div but we all know that duplication code is bad.

So there should be another, more elegant solution. If we could use t3lib_div's version, there will be no need for global incluLibs at all. We will just use EXT:-like syntax for plugin userFunc and that's all! It will be loaded only when used.

Current solution is really bad. As soon as you have extension loaded (not used but just loaded in EM!), all its USER plugins will be loaded. Imagine a plugin that includes a huge PHP library... Bad thing :( Even if it is not a huge PHP library but simply loaded but not used extensions - still bad to parse all this unused code.

We could also avoid the problem adding delayedIncludeLibs. Keys could be plugin titles and values are file paths. cObj's callUserFunction could include file from delayedIncludeLibs when necessary. This is a quick and dirty solution.

-- 
Dmitry Dulepov
TYPO3 Core team
More about TYPO3: http://typo3bloke.net/
Subscribe: http://typo3bloke.net/rss.xml
Latest article: http://typo3bloke.net/post-details/how_to_fill_realurl_cache/


More information about the TYPO3-team-core mailing list