-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Pull Requests listing is way slower on Windows #15401
Comments
It does not seems to be related to the DB. I've tried to move gitea service in another faster computer. The pull requests listing was 2x faster : 30 seconds => 15 seconds. |
Could you enable pprof and paste the profile file |
Yes, here you are: |
Have you load the pull request list page when you enable pprof? It seems there is no any functions about that. |
Yes I did, but if it didn't worked, then I can make it again, no problem. Here you are: |
This is another profile.log:
|
And this is our app.ini file (a little bit modified to remove sensible info) |
Could you also paste your gitea logs? |
Yes, of course. Here you are:
These are the files:
And this is how much time it took to go to Pull Request Tab: Kind regards, |
Thanks for extensive logging files and pprof files but please could you read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems
Your logs are essentially unreadable because of this setting. You have not given us the router logs so I can't tell which URL is slow. Which url exactly is slow?The pprof files are also in the incorrect format - pprof files should be binary files. You can get one quite easily:
And then request the broken page whilst this is downloading. The text files aren't really very useful at all. The profile.log in this #15401 (comment) is in the right format but doesn't actually contain the slow page request so nothing can be inferred. |
Ok, no prob. I change the logging settings to the one in your documentation: Level=debug, and SQL.Log = False. Thank you for the explanation of how pprof works. I was using it improperly. Also for your question this is the url that is slow: http://localhost:54326/Ramasoft/Ramasoft.NET/pulls This is what i did:
These are the files I can give to you: It is ok now ? Kind regards, |
One quick thought. Most Windows users have seriously long path environment variables. Windows doesn't hash this path unlike Linux and Mac. We're mostly using git directly these days. Set your |
Your logs still have stacktraces and are still missing the router logs. What is the contents of your [log] section? Unfortunately it's now too late for me to look at your pprof output so I'll take a look tomorrow. |
I'll try that. |
1.14 uses git itself, whereas 1.13 used a go library for some git operations, and git for the remaining operations. It is possible to build 1.14 using the go based library, it just isn't the default. |
Sorry for the inconvenience. Router was set to its default value "Console" and not File, that's why I could not provide you the needed information. I fixed this and also removed stack trace. |
Is there a way to retrieve easily this version of gitea 1.14 using go library for git ops ? To test and see if it solves the slonesses. |
Have you tried setting the path to git yet? I would be seriously interested to know if that improves things. Gogit variants are set at build-time so you would have to build gitea yourself adding the tag |
The Log.txt you have provided is only at info level. We need debug logs. Please could you read the link I sent you. (Actually also give us a copy of your app.ini - you never know if it's going to be enlightening.) |
Not yet. I'm doing that in minutes, and tell you what afterwards :) |
Mmm, that's what is in your documentation. The log section is the following:
So Level = Debug and Router_Log_Level is set to Info like in the doc. |
I've set the git path:
It's working, but no performance improvement. |
Argh. You're not supposed to copy app.example.ini as your app.ini! It doesn't work like that. You're only supposed to use it for reference to know how to set things. That's it tomorrow morning I'm going to open a PR to remove it - it seems no one can be trusted with the damned thing. Remove the log.XXX sections. Remove settings in the log section that aren't mentioned in the documentation. Look through the rest of your app.ini if it's unchanged from the app.example.ini consider if you really mean it to be set. I think the queue sections are also incorrect. Certainly the Cron sections are likely to be unhelpful. I'm not convinced that any of these things are causing your problem but they're unhelpful. Shame about the git path thing - we're sort of stuck though until I can pprof and you give me some debug logs. |
From 30s-cpuprofile.log, it seems most time is in |
Thanks for your investigation. I'll do that :) |
Is there a way to disable this functionality to see if it solves the slownesses ? |
This comment has been minimized.
This comment has been minimized.
It's faster with the version you provided me: 14 seconds (1.14) => 9 seconds (your version). So I think your changes are a good start. |
OK let's try the following: https://eldritchkitty.com/~andrew/gitea-15447-git-windows-4.0-amd64.exe https://eldritchkitty.com/~andrew/gitea-15447-gogit-windows-4.0-amd64.exe These have the current status of #15447 built on the 1.14-branch. |
pprof would be useful I think |
With 15447(git): https://eldritchkitty.com/~andrew/gitea-15447-git-windows-4.0-amd64.exe With 15447(go-git): https://eldritchkitty.com/~andrew/gitea-15447-gogit-windows-4.0-amd64.exe So the 15447 with go-git is way faster, and it's the same speed as in 1.13.6. |
OK - The pprofs for the 2 new ones would be helpful - I think the issue is likely going to be that |
15447(git): 15447(go-git): |
go-git's problem is at memory not cpu. |
OK so this one it looks like we could reduce the calls to show-ref by collecting them together and calling show-ref for all of the refs. |
15447-15455-git: 15447-15455-gogit: |
looks like the go-git one is actually still a git version... weird. |
Can you rebuilt the 15447-15455-gogit ? I will test it. Also, I found some slowness loading a specific PR, which was not that slow in 1.13.6. This PR has a lot of change requests, comments. I will create a specific issue ticket for this one, but maybe the subject is related. |
Can you just confirm for me that you are not running with a random AV thing that's slowing down git and that your path for the git stuff is actually reasonable? Seriously set your environment PATH so that git's binaries etc are first in order to be found. And can you tell me how many pulls you're trying to show? I've rebuilt the go-git one but I don't expect that to improve or change at all as these PRs aren't hitting that. I'm a little confused by the 15447-15455-git-30s-cpuprofile.log - it's a shame that it hasn't made much difference - I made a change that should have reduced the time spent in GetRefCommitID if the refs weren't packed in a pack. I guess is that your pull refs are packed but I'm not certain. It would be useful to know if that's the case. The reality is that the reason why the go-git one is faster is that it is just loading all the references in one shot - and keeping them in memory. Go-Git is really non-frugal with memory in general - but here it's potentially not uncalled for as realistically the number of PR heads is going to be somewhat constrained. Now I think it may just be worth doing something similar - getting all the refs in one go as they're likely to be less than 4kb in general. |
Nope, on that computer there is only windows defender.
50
With your rebuilt, it's now turning around 0,1s. So the 15447-15455-gogit is the fastest version you have provided me, right now.
How can I help you to investigate this ? |
By path I mean your environment path. Git on Windows calls a lot of sub programs so it also needs to look these up on the path. To check the refs pack status you would have to go in to the git repository directly and check which |
Yes it's already done. Please check the comment link.
I'll try that later and tell you what. |
still not completely solved I think |
In my opinion with: 15447-15455-gogit, we have a solution for my problem. Is this solution will be available in the next 1.14.1 ? For "To check the refs pack status you would have to go in to the git repository directly and check which refs/pulls/XXX/head were files versus how many are returned from git for-each-ref refs/pulls (it might be pull rather than pulls though I can never remember)". I didn't have yet the time to check, sorry. I will have time on the weekend. |
@ramasoft-dv was this fixed on 1.15? |
Nope. I have 1.15.7 and it still fails.
-------------------------
On 2021-12-15 13:29, zeripath wrote:
@ramasoft-dv [1] was this fixed on 1.15?
--
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub [2], or unsubscribe
[3].
Triage notifications on the go with GitHub Mobile for iOS [4] or
Android [5].
Links:
------
[1] https://github.com/ramasoft-dv
[2]
#15401 (comment)
[3]
https://github.com/notifications/unsubscribe-auth/ARREQNLKGATBRCAWGJP6RJLURCCZJANCNFSM42XVLTMQ
[4]
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
[5]
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub
|
Any chance you could try #17992 to see if that finally solves the issue? |
Sorry that is #17992 |
No more feedback, I think this issue can be closed, feel free to reopen if there are more clues. |
[x]
):In 1.13.6 it was fast when going in the Pull Requests tab.
We've migrated to 1.14 today (2024-04-11) and now it's 20x slower.
We have "ISSUE_PAGING_NUM" set to 50. And it takes 30 seconds to load the pull requests in 1.14. In 1.13.6, it took less than 1 second.
I put back the default value to 10, it's better but it still takes 5-6 seconds. I think there is a missing index or something not retro-compatible.
How can I help you to investigate the issue ?
Kind regards.
The text was updated successfully, but these errors were encountered: