-
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
The compare view is extremely slow #95
Comments
From the db side of things, you can try turn on From my experience the default configuration from MySQL is sometime not sufficient, but I could be wrong. |
I got a query in the slow query log but the query itself is not so slow (around 1s) :
But in the result of the query I can see lines related to other objects, I don't know if this is normal ? Is that normal to have so many ID's ? |
Any idea to optimize queries?!? Pull requests with tests are welcome ;) |
With b4cd768 i add some "test db query count"... This can be the base to create own tests and optimize queries... Any ideas? |
@kedare Sorry for the late response, the IDs probably coming from the earlier query which select the history to be listed. I doubt you could dump your production data for us to test. Probably need to setup a large set of data to test out before knowing what cause it. Will get back to you in a bit |
No problem, let me know if you need something :) |
Note that we just migrated our backend to PostgreSQL and the issue is the same, so looks like this is not related to MySQL directly. |
@kedare thanks for the update. Sorry I've not got around to testing this. With PostgreSQL it will be easier since I'm on that too. |
I am having a problem in my setup, all my compare views are extremely slow (I'm getting bad gateway from my reverse proxy in production), even when there is a very little change. I see a little bit of load on the database, and a very high CPU usage on the python process when showing the page.
The pages takes around 45s to show on my development laptop (With a copy of the production database).
Here are my versions :
django==1.11.5
django-reversion==2.0.10
django-reversion-compare==0.8.0
Using MySQL as backend.
What could be the issue ? Is this an expected behaviour ?
PS: Awesome project :P
The text was updated successfully, but these errors were encountered: