-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance issues with get_available_proceedings function #36
Comments
Let me reproduce it, what db you use? |
@javrasya I am using Postgresql 9.5 + Django 1.10.x |
@javrasya any ideas about this?? |
@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. |
@psychok7 So, can you just share river app DB dump then, Is that also confidential? I need to create the same scenario as yours as much as possible. I mean; python manage.py dumpdata river --indent=2 > river_dump.json |
@javrasya oh that i can share. it in the attachment |
@javrasya have you had any progress with this issue?? |
@psychok7 I couldn't reproduce it. I tested it with |
@javrasya ok. Anyways are you still planning on converting the logic into python and avoid the DB hits? |
@psychok7 Yes, I do. |
@javrasya ok. hopefully that will be enough to fix my problem. |
@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 |
hi @javrasya , any thoughts on my last comment? |
@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. |
@psychok7 are you still having this problem? Is there any further update on this one? If not, we can close this. |
@javrasya i think this is still happening because it was not addressed |
Couldn't reproduce, so that I am closing this issue. |
@javrasya there seems to be a performance issue with
.get_available_proceedings
function.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
get_available_proceedings
method:If i leave it like this, my page in the admin takes about
6 seconds
to load (with just 15 objects). If i comment the function, it loads in less than1 second
.My model looks like this:
Any ideas what could be causing this in that function and how it can be fixed?
The text was updated successfully, but these errors were encountered: