-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
too slow when visit homepage( / ) #3367
Comments
I have been this problem too. It slowed me the dashboard to ~16 seconds!! 😱 I don't know why there's a SQL query per cooment from attachments table, but, that's the trouble. It generated me 6789 lines of SQL query logs. I have removed the issue and all of its comments from database and the problem finished. Now, I have 79 lines from log when I load the dashboard 🎉 PD: All of comments of the issue was remove/add labels, it could be the problem... |
i have been this problem too, too many sql queries in home page when i have some issues. there are many improvments, group the split sqls to one query like below:
and update to select xxx from access where user_id=? and repo_id in(x,y,z) of course, the ajax request is another better choice:-) |
@qianlongzt @xxxTonixxx @scofieldpeng could you confirm that #4977 fix this? |
I will try to build it and test it @lunny 👍 |
I can confirm #4977 improves a lot the performance 🎉🎉 . It removes all queries from attachments. In my tests my dashboard has gone from 600 queries to 200. And 800ms to 87ms 🎉🎉 However, as @scofieldpeng says, there are many improvments, like group the split sqls to one query (from tables like Thank you very much for your work @lunny 🔥 |
i test it too, this problem has been solved now, i build a temp docker image for personal use, waiting for this pr to be merged into master branch, tks for your work @lunny :-) |
i test gitea master |
sorry for my poor engish.
[x]
):Here is the whole log for the request.
https://gist.github.com/qianlongzt/0c0a7536386b2c2f0dcdaf2189fd8672
Description
There is so many repeat SQL query, such as query same user (userid is 2) 205 times.
time spend
Page: 3379ms Template: 3124ms
Screenshots
The text was updated successfully, but these errors were encountered: