[TYPO3-core] RFC: #2731: Improved caching of locallang
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Mon Feb 4 16:54:44 CET 2008
Martin Kutschker schrieb:
> Hello everybody!
>
> This is a SVN patch request.
>
> Type: Improvement
>
> Bugtracker references: http://bugs.typo3.org/view.php?id=2731
>
> Problem: all preprocessiing of localized strings (incl. the caching) is
> done in the "native" character set of the language. That means that
> TYPO3 will (especially for XML files) do a constant conversion from one
> charset to another (most likely from iso-8859-1 to utf-8). This is a
> performance hog.
>
> Solution: hold all localized strings internally (and in the cache files)
> in the required charset. Do any conversion only once, ie when building
> up the cache. In the BE the charset is detetmined by the language or
> forceCharset, in the FE it's also possible to override it further via
> config.renderCharset. t3lib_div::readLLfile() will auto-detect the
> charset (from forceCharset and $lang), but has got an optional charset
> argument (used in the FE for forceCharset).
>
> Notes: This is a change from the old internal behaviour. Now all the
> strings are correct at once (after loading from file) without the need
> for further processing.
>
> Warning: I have started this patch a long time ago for the BE. This part
> worked well. The part for the FE I have written right now (in the
> night). This part is not so well tested.
>
> As the diff is nearly unreadable please test with various setups. Use
> languages with different charset, set and unset forceCharset, fiddle
> with renderCharset. In typo3temp/llxml you'll find a cache file for each
> locallang.php, language and charset.
New version of the patch along with the changes in t3lib_div as a whole
(the readLLfile-family).
Masi
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug_2731-v2.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080204/47c00eaa/attachment-0001.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_2731-v2-t3lib_div.php
Type: application/x-php
Size: 10373 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080204/47c00eaa/attachment-0001.bin
More information about the TYPO3-team-core
mailing list