accumulating projects in kate lead to excessive kate startup time due to git

Milian Wolff <[email protected]>
Newsgroups gmane.comp.kde.devel.kwrite
Message-ID <4885217.thVcg5PcIX@milian-workstation>
Hey all,

Kate took ~4s to show its main window on my beefy workstation with lots of 
RAM, CPUs and speedy NVME disks. I found this quite odd and wondered about the 
reason so I sat down and profiled it. Perf shows a lot of external git 
processes running sequentially, which I could also replicate with strace:

```
$ strace -o kate.process.log -f --timestamps -e process kate
$ grep -E "execve.*git" kate.process.log  | wc
    159
```

See also: https://invent.kde.org/-/snippets/2234

The reason, it turns out, was that my kate accumulated a lot of projects, and 
all of them got queried for their git status.

I hope that you all agree that this isn't acceptable. The question now becomes 
how to resolve this:

a) I never knowingly opened a project in kate, this is all done automatically 
in the background. Is it expected that I should manually cleanup the project 
list then? Or can this be done automatically, e.g. by marking projects as 
unused after some time when we don't open a file in them in the last week or 
something like that?

b) Can we query the git status in parallel for all projects, instead of 
serially? My machine has 12 cores and 24 threads, and the NVME disk and ram 
should also allow this.

Thanks

PS: For now, I manually closed all projects and now have a fast kate startup 
once again.

-- 
Milian Wolff
[email protected]
http://milianw.de
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEezawi1aUvUGg3A1+8zYW/HGdOX8FAmKtwe4ACgkQ8zYW/HGd
OX/0Eg//YI6gP0OJ5sHbxvm13HLM8eLj2UGrxaAqcaqiunOKVdIudk21LCRILdAu
5jVeeFTdb7Mri/RH5aS+s9VsJQtmznNAlYQ2apn118aV4iREYmxV6R7mz2PzlqgP
TNL2H3bnrtLzOYC3oWdIC42/aXO+cqjLdU6SUWknHk1QwWtBInOHBSxPjHJmF9v1
m6wAb7t+N+eec9Aimn9XjXXE0visc6Z6bSXhmdAVZfbxSUD4EQrDR0gxP00PqHV+
iFp0i5oaC43oFrRjUDb65rCPNFJ3/Dc3kKpfjfnfJ4VjkSUPWvtctpyPAXOQTxbl
+42AsmuqS96NlooFSSmUiJ2vxsrKPSqmkKtPilsEOA9YRwT94L49Zzff1VUVCATl
SV9SNNEQaN4eeg1p35HWPBKHV3sxxoX45wsgK996NdDuUCI+nV0pxAaDbqFk+Ykb
ahF1Qf5mguTDqaDbvSmc72GfBjSzuRHLLWnXWUDK/YI0N56XxToEorF4+Kua8Q2H
nV53bDtMSKiu7141TKy46Z4xmIS/Fz9X/UZFwg1DqL488h2Yfadekkw2vsXrHAr9
AYB3SzgMYt3nhWmt2JKCX3cJA23q0TAGEJ4epDQUlpfuH5TIvZFGLu67PMoagz8d
MaMD+HDAzU2U4AC/nfy5lRnFJSfA/NKCP/pRDd5ad4ts0ikSuLU=
=AUyi
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.