- attached stress.py
(original reporter: ged) Today I played a bit to optimize SA queries and the results are quite encouraging. I've only looked at optimizing SQL queries so far (but it also pays off in the ORM).
The patch is not complete so far, as it breaks some functionality which I didn't have time to rewrite: PickledResultProxy, BufferedColumnResultProxy, and possibly other rarely used stuff (the whole Elixir test suite passes though).
See attached ugly test script I used to time this stuff (sorry, Elixir based, I was so excited I wanted to test this quickly) along with timing on my computer.
The speedup is more important for larger queries (especially when using more columns) and is more important for columns which don't need processing (String vs Unicode). The speedup is much less impressive through the ORM, but it still achieves 10% boost pretty easily, and much more on larger queries involving a lot of columns which don't need to be processed... Yeah that's probably a rare usecase, but well... it doesn't hurt.
PS: Sorry, couldn't resist the catchy summary ;-)
(original author: ged) Timing test