[TYPO3-mvc] Strange performance problem - a lot of database queries

Jochen Rau jochen.rau at typoplanet.de
Wed May 12 17:41:07 CEST 2010


Hi.

> Am 12.05.2010 17:07, schrieb Lienhart Woitok:
>> Hi Thomas,
>>
>> this is indeed a problem, I face quite similar problems. I applied a
>> patch Xaver Koch posted on forge which helped.
>>
>> But if you use value objects I have bad news for you: value objects
>> are severely broken in several ways. One thing is that value objects
>> are always considered dirty by Extbase so each value object and
>> objects containing value objects are dirty and thus updated in the
>> database. I have a working version without this problem but it is most
>> probably not a final solution. It is based on the before mentioned
>> patch by Xaver Koch but extends it for use with value objects/cloned
>> objects. Another point on value objects: since Jochen Rau introduced
>> translation handling, value objects are persisted without content
>> (since the argument $rows for insertObject() in Persistence_Backend
>> was removed but is used to pass the content of a value object into
>> this function).

That's a regression. Did you file an issue for this?

>> I measured performance using TYPO3 time tracking functionality
>> resulting in something like 800 milliseconds for controller and 1300
>> milliseconds for persistence before solving this, about 800 ms for
>> controller, 80 ms for persistence afterwards. There were about 80
>> objects handled by persistence, the template displayed near to nothing
>> (missing lazy loading, but that is not the point here).
>>
>> I attached a patch that helped me here but I should mention that I'm
>> neither sure whether this is a solution or just fighting symptoms (I
>> suspect latter) nor that this is stable. Therefore I did not put it on
>> forge yet. If you don't use value objects this patch should still help
>> you.

There are indeed several things to be fixed and optimized. I know that 
there are several patches pending addressing this topic and I am sure 
that we get the things fixed before TYPO3 4.4beta3.

How should we deal with ValueObjects? ATM there is a mechanism that 
tries to avoid duplicates (= ValueObject with the same set of propety 
values) in the database. And ValueObjects are persisted on every hit. 
That's intended but inefficient and should be solved another way.

Regards
Jochen


More information about the TYPO3-project-typo3v4mvc mailing list