-
Notifications
You must be signed in to change notification settings - Fork 9
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 improvement. Process raw JSON data incrementally. #7
Comments
Pertinent discussion on IRC:
|
https://github.com/supertuxkart/stk-stats/blob/master/userreport/maint.py#L109 is interesting here, looks like someone was trying to fix this already. Anyone know if it worked and if not, why not? @leyyin |
To be honest I can't remember exactly, but afaik it was slowing down the script a lot. |
Better slow than not working, right? |
Slow as in will hog the server for like half a day slow, so it is technically not working. |
Could you work on this soon then please? Or maybe @Alayan-stk-2 wants to learn python :P |
Currently every time the
maint_graphics.py
generates the report data, it removes all the old data and starts to process all the new data from scratch.This is quite inefficient as it takes quite a lot of CPU power and memory (especially on low ram machines, cough digitalocean VPS).
A better solution would be:
userreport
table that was affected.Maybe another column which has the SHA1 sum of all the columns that identifies the device, so that we do not have to add non-clustered keys on all columns in the
graphicsdevice
table.But I am not sure which is faster, one column SHA1 sum (non-clustered key) OR all columns non-clustered keys (that uniquely identify a entry device).
The text was updated successfully, but these errors were encountered: