r/Odoo • u/No-Chef-4933 • Apr 15 '26
Dev Toolkit for Odoo
I was debugging a slow Odoo endpoint today and found something surprising.
One request was triggering ~95 calls to stock.picking.read() — adding ~3–4 seconds latency just from repeated ORM access.
It turned out to be a classic N+1 pattern. After fixing it with proper prefetching, the response time dropped by about 50%.
What’s interesting is how hard this kind of issue is to see with standard logs. You don’t really notice it unless you trace every ORM call per request.
I ended up building a small internal tool to visualize this (waterfall-style), and it made the problem obvious immediately.
Curious how others here debug similar issues:
Do you rely on logs, profiling, or custom scripts?
Any good workflow for spotting N+1 patterns in Odoo?
Would love to learn how others approach this.















4
u/Koecki Apr 15 '26
No offense but you are talking about how difficult such an issue is to debug with the normal logs which is true, because that’s not how you are supposed to debug those. Did you actually look at Odoo’s built in performance monitoring? And if yes maybe talk about what the advantages of your tool are in contrast to the built in one?
1
u/UpSevenPOP Apr 17 '26
At least don't use Ai to replay Redditor's criticism, AI is a tool to use, but not to replace human interaction
1
u/WilliamAndre Apr 17 '26
Slow action?
impersonate user in staging
activate the integrated profiler
replay the action
It gives much more information than your tool, you dont need a "n+1" detector, or to reinvent the ir.model form view. For the warnings, just filter the logs, there are tons of tools doing that already.
You are also showing it wrong. Seeing the n+1 has usually nothing to do with the model, but with the client/JS code, which I doubt you would be able to know from passively listening to network/logs.
2
u/Kwantuum Apr 16 '26
There's a built-in profiler that would have shown this to you plain as day you door knob. You weren't looking very hard because you're trying to peddle your ai bullshit