·1 min
I was recently reading about F1, Google’s fault-tolerant distributed RDBMS and came across this neat little summary of what’s wrong with ORMs.
- Obscured database operations
- Serial reads
- Implicit traversal
Obscured database operations essentially means that when scanning code, you cannot easily tell which code is going to kick off a network round-trip to the database. If you care about writing code that performs well, it’s pretty important to know.
Serial reads are what many in my circles know as “potato programming”. When you have a loop, and something inside that loop is doing a query, that’s potato programming. Again, disastrous for performance.
Implicit traversal is doing unwanted joins and loading unnecessary data. ORMs tend to load up an object with all of its instance variables, which often means traversing the graph of references.
For bonus points, these three things are also what’s wrong with Launchpad’s API.
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.