Skip to content

Studio: hanging on Git operations, Git menu very slow to load #269

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

Closed
zdateh opened this issue Jul 28, 2023 · 10 comments
Closed

Studio: hanging on Git operations, Git menu very slow to load #269

zdateh opened this issue Jul 28, 2023 · 10 comments
Labels
bug Something isn't working customer Based on customer feedback (as opposed to something identified by developers)

Comments

@zdateh
Copy link

zdateh commented Jul 28, 2023

I am unable to practically use the Git menu in studio - doing operations like 'Fetch from Remote' just hangs Studio, with no error or anything in the console. Are there any ways I can diagnose what is causing this?

The Git menu is also slow to load - it takes around 5 seconds to display, which makes it pretty hard/annoying to use whilst working. I also fancy this extension has slowed down Studio in general.

By using a combination of what works and Git bash, I can do change control, but not really ideal!

@isc-tleavitt
Copy link
Collaborator

@zdateh are you set up with an https remote? This sounds like #235.

@zdateh
Copy link
Author

zdateh commented Jul 28, 2023

@isc-tleavitt Hi, yes we're using an https remote (Azure dev ops). Would ssh remotes potentially help (that's the other option provided in Azure)?

re: #235 I haven't seen any credential checks coming up

@isc-tleavitt
Copy link
Collaborator

@zdateh yes, switching to ssh would fix the issue.

The problem is that the credential check is coming up in the background and hanging the process on the server. :(

@isc-tleavitt
Copy link
Collaborator

Closing this as a duplicate of #235

@isc-tleavitt isc-tleavitt closed this as not planned Won't fix, can't repro, duplicate, stale Jul 28, 2023
@zdateh
Copy link
Author

zdateh commented Jul 31, 2023

Switching to SSH has indeed fixed my remotes issue - all git operations appear to succeed so far, thanks!

However it's still as slow in studio as before :( I am unsure what it could be doing in the background as git operations are near-instant from the command line, but as soon as I click on that Git menu, it's doing nothing for 5 seconds. Any ideas?

@zdateh
Copy link
Author

zdateh commented Nov 27, 2023

Hi, could we please re-open this? We have been using SSH as requested but the menus and studio operation is still noticeably slower with Git extension active. e.g.:

  • re-opening/closing studio with many routines/classes being edited takes over a minute.
  • loading a routine/class takes 5-10 seconds

None of them dealbreakers but can be annoying whilst developing :)

Cheers

@isc-tleavitt isc-tleavitt reopened this Nov 27, 2023
@isc-tleavitt
Copy link
Collaborator

isc-tleavitt commented Nov 27, 2023

@zdateh sure, happy to reopen given your observations.

Technically speaking (for whoever picks this up):
We run "git status" to see what's currently pending. There's some caching of the results built-in for rendering the menus (so that we don't re-run for each menu item), but not across operations (e.g., loading multiple tabs with different files in Studio). Load of a single class/routine taking 5-10 seconds is particularly unexpected.

@zdateh - if you could capture %SYS.MONLBL (RtnLine/Time/TotalTime) on SourceControl.Git.* for loading a single routine (which is taking 5-10 seconds) and attach as CSV that would be super helpful. I'm pretty sure the overhead will just be in the $zf(-100) calls, which perhaps we could look to reduce somehow, but it would be good just to be sure it's not something else/surprising.

@zdateh
Copy link
Author

zdateh commented Nov 27, 2023

Thanks! Attached csv:
zcjb_sourcecontrol.csv

@isc-tleavitt
Copy link
Collaborator

@zdateh thank you, that's super helpful - the bottleneck isn't at all where I would have expected. (Which is why %SYS.MONLBL is so great.)

Top issues are:

Routine | Line | RtnLine | Time | TotalTime | Code
SourceControl.Git.Extension.1 | 41 | 3 | 0.000023 | 7.5793 | do ##class(SourceControl.Git.Change).RefreshUncommitted(,,.files)
SourceControl.Git.Change.1 | 1042 | 6820 | 0.007226 | 7.011443 | set InternalName = ##class(SourceControl.Git.Utils).NameToInternalName(filename,0,0)
SourceControl.Git.Utils.1 | 989 | 6832 | 0.04499 | 5.520985 | set sc=$system.OBJ.Load(Name,"-d",,.outName,1)
SourceControl.Git.Utils.1 | 1459 | 13694 | 0.012658 | 1.299256 | If ##class(%Library.RoutineMgr).UserType(InternalName,.docclass,.doctype) {

We can definitely optimize these things.

@isc-tleavitt isc-tleavitt added bug Something isn't working customer Based on customer feedback (as opposed to something identified by developers) labels Dec 7, 2023
@isc-tleavitt isc-tleavitt added this to the Q1 2024 Polishing milestone Dec 7, 2023
@isc-tleavitt
Copy link
Collaborator

This is fixed via #318.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working customer Based on customer feedback (as opposed to something identified by developers)
Projects
None yet
Development

No branches or pull requests

2 participants