[TYPO3-mvc] findOneBy memory usage
Saverio Vigni
s.vigni at hor-net.com
Wed Jul 18 02:28:12 CEST 2012
Hello everyone i have a problem with the findOneBy
I'm making a simple web spider for checking the link structure of a
quite big vacation rental website, everything goes fine until I check in
the link table if the link I found in the page already exists, actually
I'm using the code:
$newPage = $this->pageRepository->findOneByUrl($link->getUrl());
if(!$newPage){
$newPage =
$this->objectManager->create('Tx_Webspider_Domain_Model_Page');
$newPage->setUrl($link->getUrl());
$this->pageRepository->add($newPage);
}
this is inside the loop of the links found in the page I'm processing,
the cal to the findOneBy makes the memory usage grow from 48MB to
hundreds of megabytes.
I tried rewriting the function and the problem happens when I try to
access the result of the query with the getFirst() method.
I haven't been able to understand if the leak is in my code or in
extbase, can anybody help me?
Thank you
Saverio Vigni
http://www.hor-net.com
More information about the TYPO3-project-typo3v4mvc
mailing list