Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak encountered #3

Open
gioperalto opened this issue Jul 2, 2015 · 0 comments
Open

Memory leak encountered #3

gioperalto opened this issue Jul 2, 2015 · 0 comments

Comments

@gioperalto
Copy link

I've recently discovered this CakePHP-SimpleHtmlDom-Plugin and it is a dream, because I avoided having to do A LOT of work myself, so I'm extremely grateful, however I recently encountered a memory leak...

In one of your updates I believe it says memory leaks fixed, so I just wanted to report this issue.

In a controller action for my web app, I call a function that traverses new URLs in a loop:
function myFunction() {
$urls = $this->Url->find('all',
array(
'conditions' => array(
'status' => 'New'
),
'limit' => $limit (I've had to set a limit because the memory leaks would crash my method)
)
);
foreach($urls as $url) {
// function call; calls $this->SimpleHtmlDomModel->find('all',compact(array($link)))
}
}

I would recommend testing on a large set of values to replicate the bug.

Naturally, Im going to attempt to make my algorithms more efficient, however this is the error I received:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in (path to project directory)/app/Plugin/SimpleHtmlDom/Vendor/simple_html_dom/simple_html_dom.php on line 1201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant