[TYPO3-performance] DataHandler high memory consumption

bernd wilke t3ng at bernd-wilke.net
Tue Nov 4 14:45:16 CET 2014


Am 04.11.14 14:05, schrieb Philipp Gampe:
> Hi bernd wilke,
>
> bernd wilke wrote:
>
>> wouldn't it help to cache the pure page-TSconfig, which should be very
>> static (just conditions which vary the result and end in different
>> cache-entries), and add the user-TSconfig each time a user accesses the
>> page?
>
> No, because of the nature those conditions work. E.g.
>
> foo.bar = baz
> [GLOBALSOMETHING]
> foo.bar = baz2
> foo.baz = bar
> [END]
> foo.baz = bar2
>
> If the condition is true, you get
> foo.bar = baz2
> foo.bar = bar2
>
> With your idea, you would get:
> foo.bar = baz2
> foo.bar = bar <---

why?
in FE the caching works depending on conditions in the form that the end 
result is cached.
Hier you can cache the resulting php-array, depending on the conditions 
and so both variants would include
foo.bar = bar2

otherwise you could cache the TS without the condition-lines
true:
--------------
foo.bar = baz

foo.bar = baz2
foo.baz = bar

foo.baz = bar2
--------------

... respective without the conditioned lines:
false:
--------------
foo.bar = baz




foo.baz = bar2
--------------



>> afterwards you may do additinal caching with the combined TSconfig using
>> page-uid and user-uid/ group-uid  (and any conditions) as key. maybe
>> with the option to release an entry after a given time to reduce memory
>> consumption?
>
> I already though about this a bit and maybe a cache would help that caches
> the individual parts that are later combined:
> * global TS
> * userTS
> * groupTS for each group
> * pageTS field for each page
>
> Then we would need to flag this entry whether it contains a condition or
> not. If it does, we would need to evaluate it again. Otherwise we could use
> it directly.
> That way, we could try to keep conditions in a few entries only and could
> make use of a cache for all others.
>
> This does not help the thread starter tough, because we still need the full
> TS array for each page in the end.

but it may help to save time and fasten the BE

and back to the origianl problem:
if caclulating the page-TSconfig is fastened it may be possible to avoid 
the big array especially when each page is accessed just one time for 
one action. the next click will build up the array anew anyway.

bernd
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-performance mailing list