Skip to content

Instantly share code, notes, and snippets.

@jwage
Created November 30, 2010 22:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwage/722508 to your computer and use it in GitHub Desktop.
Save jwage/722508 to your computer and use it in GitHub Desktop.
FROM: Harvey Ball <me@harveyball.com>
-------------------------------------
Hi,
Why does doctrine piss memory up the wall like a drunken slag on a saturday night?
I built a basic test such as....
Sku table
-------------
name
description
then built with a simple for loop 100 items to insert then i did a for loop to go through my 100 items in my array and do the following
$sku = new Sku()
$sku->setName(<data>)
$sku->setDescription(<data>)
$sku->save()
(i've also added free, free(true) clear connection, close connection, blah blah blah)
Anywho, doing that causes memory to run out.
Now.......... doing this same example in propel happily processes without increasing memory
It also works perfectly fine in pdo or even using the built in php database functions.
Oh Hibernate in java also copes just fine, jack rabbit again no problem.
So why is doctrine so crap at this basic function?
Perhaps you should stop blaming this problem on the state of an ORM as pretty much every ORM ive ever used can handle this sort of stuff just fine and dandy.
I see in doctrine 2 you have a clever way of flushing the cache, nice hack, does this work in ie6?? lol
see if you can talk to the guys at propel and see how they do it, cos it works for them.
have a nice day
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment