JetpackDuba / Gitnuro

A FOSS Git multiplatform client for newbies and pros
https://gitnuro.com/
GNU General Public License v3.0
872 stars 44 forks source link

"Stage all" can be very slow #129

Closed miroirdelame closed 8 months ago

miroirdelame commented 1 year ago

For some reason (that I don't know), using the "Stage all" feature usually takes a long while (~ 10 seconds), even though there is actually 1 file to stage. Staging one single file is, on the contrary, instantaneous.

So couldn't it be relevant that the "Stage all" button just stages all files in the list file by file (I guess it currently proceeds differently, maybe using a dedicated git command) ? I have no idea of the possible drawbacks, so please take that as a simple suggestion :)

JetpackDuba commented 1 year ago

Yeah, I've noticed it too. I'd like to look into it for 1.4, because if you mix Git LFS it's even slower, it may take over an hour with huge files. My assuption is that JGit internally goes file by file doing some kind of long operation. I may have to email the maintainers to ask them about it.

An alternative would be doing a status myself before the (un)stage all and perform the operation individually on each file.

JetpackDuba commented 8 months ago

Hey! Just quick update: With yesterday's commit, I've been able to reduce the staging time to even less than 10% of what took before in big repositories. I'll test it a bit more but looks promising :smile: