[TYPO3-mvc] Does the Persistence Layer not respect dirty objects?

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Thu Jun 7 11:29:41 CEST 2012


Thanks for your reply!

What I have figured out is, that if I add hundreds of
objects via $repository->add() and call persistAll()
once at the end, it inserts those hundreds of objects
into the database in a few seconds only.

But if I call persistAll() after every ->add(),
it can only handle a handful of objects per second,
which is really, really slow. It seems to be a
performance loss of a factor of about 10.

Is the only way of having a good performance here,
to add a custom cache which would hold already
instantiated objects or can I speed up Extbase's
persistence/query layer in some way here?

Thanks you,
Thomas

Sebastian Kurfürst schrieb:
> Hi Thomas,
>
> the described behavior is correct. It is implemented this way in every
> other ORM I know of, f.e. Doctrine2.
>
> The main reason is performance: It'd be very very hard to make the
> queries fast across these in-memory objects.
>
> If you need this feature, you should rather build an
> application-specific index of $object yourself.
>
> Greets,
> Sebastian
>


More information about the TYPO3-project-typo3v4mvc mailing list