plugin git_status makes switching tab very slow

Plugins for SynWrite and CudaText...
Post Reply
demanuel
Posts: 8
Joined: 31.05.2021 20:27

plugin git_status makes switching tab very slow

Post by demanuel »

plugin git_status makes switching tab very slow when the git repo is big (lots of files).

Don't know if i should report it here, but i didn't found the github repo for that that plugin and i didn't find any entry in this forum. Please move it if this is not the right place for this report.

Regards
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

Plugin runs git several times

ret = self.run_git(["symbolic-ref", "HEAD", "--short"])
output = self.run_git("status")
output = self.run_git(["branch", "-v"])

It makes it on each tab-switch.
I don't know how to speed it up. also, git processing was taken from Sublime plugin (Git Status too).
demanuel
Posts: 8
Joined: 31.05.2021 20:27

Post by demanuel »

The call to:

Code: Select all

git symbolic-ref HEAD --short
returns only the branch name

The call to:

Code: Select all

git branch -v
returns all the branches, the hash, and the last commit. Is it really necessary? Can't be replaced with

Code: Select all

git branch -l
?

Also the first call

Code: Select all

 ret = self.run_git(["symbolic-ref", "HEAD", "--short"])
is not required as it can be merged with the git branch call.

the call to

Code: Select all

git status
can be replaced with with

Code: Select all

git status -u no 
. This call won't show the untracked files and it will speed up (at least in my repo) 400% in comparison with

Code: Select all

git status
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

I need to check this all. I took Git handling python code from
https://github.com/randy3k/GitStatusBar ... tus_bar.py
can you make the patch and test it?
demanuel
Posts: 8
Joined: 31.05.2021 20:27

Post by demanuel »

i can depending on my free time.
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

Plugin was partially rewritten using 'threads', so test again, seems pause is solved.
Post Reply