[TYPO3-core] RFC: Integrate Doctrine2 into TYPO3 CMS

Popy popy.dev at gmail.com
Sat May 31 10:29:35 CEST 2014


2014-05-31 1:05 GMT+02:00 Daniel Moritz <d.moritz at gmx.org>:

> In my opinion, Doctrine 2 DBAL on its own cannot increase the speed,
> because the queries to the database will be the same as before. The key
> benefit by using DBAL is the data abstraction, that means other database
> types than mysql can be used without the need to rewrite the existing code
> - not much more. But it cannot be used to optimize the speed, because there
> is no datamanager for already fetched data. This advantage takes place in
> the ORM - there is an entitymanager, which avoid new queries to the
> database, if the requested data was fetched already, can be identified by
> its primary key and therefore delivered directly from memory. Not only in
> this point we should differ between DBAL and ORM ...

Well, it is obvious for me that it will have a small effect on speed, but a
huge effect on memory usage.

* Doctrine will hang somewhere in memory Class metadata, which duplicates
TCA informations
* When you manipulates entities (in the core or in plugins), the
EntityManager keeps them "managed" until you "detach" them. It's a kind of
cache, but will also consume memory. It's a bit tricky to know if something
should be kept managed or not, and Entity associations only make things
worse.

Doctrine is a wonderful tool, but it is not very wise to add it on top of
Typo3 as an optional tool. At the end it's only a shitload of code,
classes, and metadata thrown onto the already huge Typo3 codebase. It won't
be efficient unless the whole core relies on it and get rid of every legacy
who could be replaced by it. Mocking TCA as metadata only duplicates it,
the right way to do it would be to remove the TCA, and replace it by
Annotations in Entity classes

Regards,
Popy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20140531/69f496d8/attachment.htm>


More information about the TYPO3-team-core mailing list