Every few months, someone on the team sighs during a retrospective and says the words that make me reach for coffee:

“Doctrine is slow.”

No, it’s not. Doctrine is an ORM. It does exactly what you tell it to do. The problem is - most developers don’t realise how much they’re telling it to do.

This post isn’t a tutorial. It’s a field report from someone who’s watched Doctrine crawl through millions of rows... and then, after a few lines of code change, fly through them using less memory than Chrome with two tabs open.


Scene 1: The 900 MB Disaster

A CLI command meant to clean up stale product records. Half a million entities. Nothing fancy. Just iterate and tweak a few fields.

$products = $this->repository->createQueryBuilder('p')
->getQuery()
->toIter...

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help