[TYPO3-mvc] ExtBase performance

Tomita Militaru militarutomita at gmail.com
Sun Feb 17 12:20:28 CET 2013



> Jigal van Hemert <mailto:jigal.van.hemert at typo3.org>
> 17 februarie 2013 10:39
> Hi,
>
Hi,
> Using TCEmain is not faster, but a lot slower. There are a lot of 
> advantages though. The data is inserted like it would be as if someone 
> edited it in the TYPO3 backend.
> The different TYPO3 fields for timestamps, etc. will be automatically 
> set, workspaces are taken into consideration, TCA settings will be 
> used (if a field has eval processing/restriction settings these will 
> be applied), hooks are honoured, table access rights are checked, etc.
Thanks for the clear explanation!
>
> Some extensions like EXT:solr use a hook in TCEmain to be notified 
> when records are inserted or modified (EXT:solr uses it to add records 
> to its indexing queue).
>
> It really depends on what you are importing and which TYPO3 features 
> you'd like to support.
Turns out in this case I don't need to insert them via TCEmain, I don't 
need not even a timestamp for them.
>
> Tomita Militaru <mailto:militarutomita at gmail.com>
> 16 februarie 2013 13:17
>
>
>> Lorenz Ulrich <mailto:lorenz-typo3 at visol.ch>
>> 16 februarie 2013 13:09
>> Hi Tomita
>
> Hi Lorenz
>>
>> You should have a look at external_import.
> I did, I prefer to have it in my extension.
>>
>> If you want to do it in your own extension, I suggest using TCEmain:
>> http://blog.tolleiv.de/2010/03/handling-data-in-typo3-with-tcemain/
> Is there any advantage to this than using INSERTmultipleRows? I just 
> tried it with insert and it took 10 seconds, so I'm pretty satisfied 
> with it.
>>
>> Best regards,
>>
>> Lorenz
>>
>>
>>
>> _______________________________________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>> Tomita Militaru <mailto:militarutomita at gmail.com>
>> 16 februarie 2013 11:34
>> Hello,
>>
>> I am trying to import a CSV file with over 65.000 records using an 
>> ExtBase extension I'm building. But seems like that ExtBase can't 
>> handle that many objects or are too many as it takes nearly 30 
>> minutes to store them in the database.
>>
>> To test, I tried something like this:
>>
>> $persistenceManager = 
>> t3lib_div::makeInstance('Tx_Extbase_Persistence_Manager');
>>
>> for($i = 0; $i < 65000; $i++) {
>>         $objectNew = 
>> t3lib_div::makeInstance('Tx_MyExtension_Domain_Model_Object');
>>
>>          $objectNew->setZip('123456');
>>          $objectNew->setHouse(5);
>>          $this->objectRepository->add($objectNew);
>> }
>> $persistenceManager->persistAll();
>>
>>
>> Should I just do it with plain INSERTs as it worked much better using 
>> that method? Is there a more efficient way to store objects in 
>> ExtBase that I am not aware of?
>>
>> Thanks!
>> _______________________________________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
> Lorenz Ulrich <mailto:lorenz-typo3 at visol.ch>
> 16 februarie 2013 13:09
> Hi Tomita
>
> You should have a look at external_import.
>
> If you want to do it in your own extension, I suggest using TCEmain:
> http://blog.tolleiv.de/2010/03/handling-data-in-typo3-with-tcemain/
>
> Best regards,
>
> Lorenz
>
>
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
> Tomita Militaru <mailto:militarutomita at gmail.com>
> 16 februarie 2013 11:34
> Hello,
>
> I am trying to import a CSV file with over 65.000 records using an 
> ExtBase extension I'm building. But seems like that ExtBase can't 
> handle that many objects or are too many as it takes nearly 30 minutes 
> to store them in the database.
>
> To test, I tried something like this:
>
> $persistenceManager = 
> t3lib_div::makeInstance('Tx_Extbase_Persistence_Manager');
>
> for($i = 0; $i < 65000; $i++) {
>         $objectNew = 
> t3lib_div::makeInstance('Tx_MyExtension_Domain_Model_Object');
>
>          $objectNew->setZip('123456');
>          $objectNew->setHouse(5);
>          $this->objectRepository->add($objectNew);
> }
> $persistenceManager->persistAll();
>
>
> Should I just do it with plain INSERTs as it worked much better using 
> that method? Is there a more efficient way to store objects in ExtBase 
> that I am not aware of?
>
> Thanks!
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc


More information about the TYPO3-project-typo3v4mvc mailing list