Sunday, October 11, 2015

Be careful, Django's ORM might be a performance killer

I was hoping Django's ORM to save my day, until I found a serious performance issue, which slow down a simply SQL query by 500x! Yes, this is not a typo, 500 times slower! It really took me couple of hours to find the issue. The reason is that Django will do an unnecessary data type conversion behind the scene. I guess this must be a workaround for some wired bug before. But holy, when you have over 1 million records, you can imagine how slow Django ORM can be (in some cases).

Now I'm getting a bit upset, after seeing the core developer team seems want me to handle the issue. Come on! I'm not a free man power, everybody has their things to do. I'm not a unreasonable person, but database related bug will definitively need test cases for dozen db engines. How the hell do have I the time to checkout the whole develop environment and study django's develop/test process? I'm afraid such aptitude of making software will sooner or later kill the project.

No comments: