Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Performance issues with get_available_proceedings function #36
@javrasya there seems to be a performance issue with
So, i followed your youtube admin tutorial and in the beginning everything seemed to work fine.
Now i have been noticing a performance issue with just 15 objects in my model. When digging a bit further, i realized the problem was in the
If i leave it like this, my page in the admin takes about
My model looks like this:
Any ideas what could be causing this in that function and how it can be fixed?
@psychok7 I am so sorry for late response. I can't find time for django-river nowadays unfortunately and that makes me sad. I will try to spend more time about django-river after today. Because it seems it is needed.
I tried to add a test case for that which is with SQLite, will commit it soon. But, couldn't reproduce it.
I will try to reproduce it psql 9.5 tomorrow. I will be informing you.
Btw, As you may have seen the logic in the function you talked about, it all lay on DB operations. I don't like it. This is probably the problem makes slowness. I think we can handle the logic in the language itself(python). I think this will be the way of much faster than that. So I will try to reimplement it by doing the same thing in python.
@psychok7, I could produce something different with
Could you please share your river app dump output with me;
So, I can try that with your scenario.
@javrasya yeah sure i understand. I will try to help out with testing and a few lines of code whenever i can as well.
Unfortunately i cannot share the all database because it's production and confidential information, but the model is pretty simple:
I also have an SSD and i7 and with a normal model its usually pretty fast. I am using Python3 and docker if that helps.
@javrasya hi again.
i have some more information on this issue. so while playing around i found that my performance issue is related to passing a user to
Do you see anything wrong with the method regarding the user groups?
If not i believe one workaround for me would be just not to use river proceeding meta groups and eventually protect it manually but that does not look like the best solution
@psychok7 I tried to do it in a bit more pythonic way. Authorization part was still hitting DB. I saw that the current version is faster than the way of doing it in pythonic. I test it with 1K objects with your scenarios. But as I said, authorization was hitting DB on that test.
I will look at that group authorization phase that you mentioned and try to understand what is your problem.