[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: accumulating projects in kate lead to excessive kate startup time due to git
From:       Waqar Ahmed <waqar.17a () gmail ! com>
Date:       2022-06-18 14:59:54
Message-ID: CAPesRH77iW2gUY5rGgt9f5VEJBh5+6Bky_J18ZjB9nJrKPLyZA () mail ! gmail ! com
[Download RAW message or body]

Yeah, sounds reasonable to me

On Sat, Jun 18, 2022, 7:51 PM Christoph Cullmann (cullmann.io) <
christoph@cullmann.io> wrote:

> On 2022-06-18 16:49, Waqar Ahmed wrote:
> > The problem with anon sessions that I face currently :
> >
> > - I want to work on a project Y, I open it
> > - Later, I want to open another folder in Kate for a moment in a
> > separate instance, I do kate -n XXX. Kate opens with both projects
> > loaded. This is not obvious, and one only starts to realize that
> > things are not working well till you have a lot of projects opened.
> > This affects a lot of features such as quick open, search etc.
> >
> > So basically, opening a folder temporarily is now an annoyance as it
> > is not temporary anymore. One has to remember to close it or kate just
> > keeps accumulating them silently.
> >
> > If this was trivial, it would have been okay, but it's not and it
> > breaks the usecase I mentioned above.
>
> Hi,
>
> perhaps temporary we should at least make the project remembering
> default off?
>
> Then people who like it can enable it, perhaps we find
> some better solution until then?
>
> Greetings
> Christoph
>
> >
> > On Sat, Jun 18, 2022, 7:33 PM Christoph Cullmann (cullmann.io [1])
> > <christoph@cullmann.io> wrote:
> >
> >> On 2022-06-18 14:38, Waqar Ahmed wrote:
> >>> This is a result of a recent feature we added, i.e., a project is
> >>> saved when you close Kate, and restored when you reopen.
> >>>
> >>> This is okay if one uses named sessions. Named sessions need to be
> >>> opened explicitly. However, for anon sessions, this was a bad idea
> >> and
> >>> is a constant annoyance.
> >>>
> >>> It's fixed in a way that we added an option to disable project
> >>> restoration(upcoming release). But I think for anon sessions
> >> projects
> >>> should never be stored in the first place.
> >>
> >> Hi,
> >>
> >> yes, I added that option to disable it for that reason.
> >>
> >> Not sure about the anon session, we store there other stuff, too.
> >>
> >> But it would make sense to try to optimize the behavior,
> >> the project loading itself should be async, does the GitWidget
> >> trigger the sync git calls?
> >>
> >> Greetings
> >> Christoph
> >>
> >>>
> >>> Waqar
> >>>
> >>> On Sat, Jun 18, 2022, 5:16 PM Milian Wolff <mail@milianw.de>
> >> wrote:
> >>>
> >>>> 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
> >>>> mail@milianw.de
> >>>> http://milianw.de
> >>
> >> --
> >> Ignorance is bliss...
> >> https://cullmann.io | https://kate-editor.org
> >
> >
> > Links:
> > ------
> > [1] http://cullmann.io
>
> --
> Ignorance is bliss...
> https://cullmann.io | https://kate-editor.org
>

[Attachment #3 (text/html)]

<div dir="auto"><div>Yeah, sounds reasonable to me<br><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 18, 2022, 7:51 PM \
Christoph Cullmann (<a href="http://cullmann.io">cullmann.io</a>) &lt;<a \
href="mailto:christoph@cullmann.io">christoph@cullmann.io</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">On 2022-06-18 16:49, Waqar Ahmed \
wrote:<br> &gt; The problem with anon sessions that I face currently :<br>
&gt; <br>
&gt; - I want to work on a project Y, I open it<br>
&gt; - Later, I want to open another folder in Kate for a moment in a<br>
&gt; separate instance, I do kate -n XXX. Kate opens with both projects<br>
&gt; loaded. This is not obvious, and one only starts to realize that<br>
&gt; things are not working well till you have a lot of projects opened.<br>
&gt; This affects a lot of features such as quick open, search etc.<br>
&gt; <br>
&gt; So basically, opening a folder temporarily is now an annoyance as it<br>
&gt; is not temporary anymore. One has to remember to close it or kate just<br>
&gt; keeps accumulating them silently.<br>
&gt; <br>
&gt; If this was trivial, it would have been okay, but it&#39;s not and it<br>
&gt; breaks the usecase I mentioned above.<br>
<br>
Hi,<br>
<br>
perhaps temporary we should at least make the project remembering <br>
default off?<br>
<br>
Then people who like it can enable it, perhaps we find<br>
some better solution until then?<br>
<br>
Greetings<br>
Christoph<br>
<br>
&gt; <br>
&gt; On Sat, Jun 18, 2022, 7:33 PM Christoph Cullmann (<a href="http://cullmann.io" \
rel="noreferrer noreferrer" target="_blank">cullmann.io</a> [1])<br> &gt; &lt;<a \
href="mailto:christoph@cullmann.io" target="_blank" \
rel="noreferrer">christoph@cullmann.io</a>&gt; wrote:<br> &gt; <br>
&gt;&gt; On 2022-06-18 14:38, Waqar Ahmed wrote:<br>
&gt;&gt;&gt; This is a result of a recent feature we added, i.e., a project is<br>
&gt;&gt;&gt; saved when you close Kate, and restored when you reopen.<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; This is okay if one uses named sessions. Named sessions need to be<br>
&gt;&gt;&gt; opened explicitly. However, for anon sessions, this was a bad idea<br>
&gt;&gt; and<br>
&gt;&gt;&gt; is a constant annoyance.<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; It&#39;s fixed in a way that we added an option to disable project<br>
&gt;&gt;&gt; restoration(upcoming release). But I think for anon sessions<br>
&gt;&gt; projects<br>
&gt;&gt;&gt; should never be stored in the first place.<br>
&gt;&gt; <br>
&gt;&gt; Hi,<br>
&gt;&gt; <br>
&gt;&gt; yes, I added that option to disable it for that reason.<br>
&gt;&gt; <br>
&gt;&gt; Not sure about the anon session, we store there other stuff, too.<br>
&gt;&gt; <br>
&gt;&gt; But it would make sense to try to optimize the behavior,<br>
&gt;&gt; the project loading itself should be async, does the GitWidget<br>
&gt;&gt; trigger the sync git calls?<br>
&gt;&gt; <br>
&gt;&gt; Greetings<br>
&gt;&gt; Christoph<br>
&gt;&gt; <br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; Waqar<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; On Sat, Jun 18, 2022, 5:16 PM Milian Wolff &lt;<a \
href="mailto:mail@milianw.de" target="_blank" \
rel="noreferrer">mail@milianw.de</a>&gt;<br> &gt;&gt; wrote:<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; Hey all,<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; Kate took ~4s to show its main window on my beefy workstation<br>
&gt;&gt; with<br>
&gt;&gt;&gt;&gt; lots of<br>
&gt;&gt;&gt;&gt; RAM, CPUs and speedy NVME disks. I found this quite odd and<br>
&gt;&gt; wondered<br>
&gt;&gt;&gt;&gt; about the<br>
&gt;&gt;&gt;&gt; reason so I sat down and profiled it. Perf shows a lot of<br>
&gt;&gt; external<br>
&gt;&gt;&gt;&gt; git<br>
&gt;&gt;&gt;&gt; processes running sequentially, which I could also replicate \
with<br> &gt;&gt;&gt;&gt; strace:<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; ```<br>
&gt;&gt;&gt;&gt; $ strace -o kate.process.log -f --timestamps -e process kate<br>
&gt;&gt;&gt;&gt; $ grep -E &quot;execve.*git&quot; kate.process.log   | wc<br>
&gt;&gt;&gt;&gt; 159<br>
&gt;&gt;&gt;&gt; ```<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; See also: <a href="https://invent.kde.org/-/snippets/2234" \
rel="noreferrer noreferrer" \
target="_blank">https://invent.kde.org/-/snippets/2234</a><br> &gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; The reason, it turns out, was that my kate accumulated a lot of<br>
&gt;&gt;&gt;&gt; projects, and<br>
&gt;&gt;&gt;&gt; all of them got queried for their git status.<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; I hope that you all agree that this isn&#39;t acceptable. The<br>
&gt;&gt; question<br>
&gt;&gt;&gt;&gt; now becomes<br>
&gt;&gt;&gt;&gt; how to resolve this:<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; a) I never knowingly opened a project in kate, this is all done<br>
&gt;&gt;&gt;&gt; automatically<br>
&gt;&gt;&gt;&gt; in the background. Is it expected that I should manually cleanup<br>
&gt;&gt; the<br>
&gt;&gt;&gt;&gt; project<br>
&gt;&gt;&gt;&gt; list then? Or can this be done automatically, e.g. by marking<br>
&gt;&gt;&gt;&gt; projects as<br>
&gt;&gt;&gt;&gt; unused after some time when we don&#39;t open a file in them in \
the<br> &gt;&gt; last<br>
&gt;&gt;&gt;&gt; week or<br>
&gt;&gt;&gt;&gt; something like that?<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; b) Can we query the git status in parallel for all projects,<br>
&gt;&gt; instead<br>
&gt;&gt;&gt;&gt; of<br>
&gt;&gt;&gt;&gt; serially? My machine has 12 cores and 24 threads, and the NVME<br>
&gt;&gt; disk<br>
&gt;&gt;&gt;&gt; and ram<br>
&gt;&gt;&gt;&gt; should also allow this.<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; Thanks<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; PS: For now, I manually closed all projects and now have a fast<br>
&gt;&gt; kate<br>
&gt;&gt;&gt;&gt; startup<br>
&gt;&gt;&gt;&gt; once again.<br>
&gt;&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt; Milian Wolff<br>
&gt;&gt;&gt;&gt; <a href="mailto:mail@milianw.de" target="_blank" \
rel="noreferrer">mail@milianw.de</a><br> &gt;&gt;&gt;&gt; <a href="http://milianw.de" \
rel="noreferrer noreferrer" target="_blank">http://milianw.de</a><br> &gt;&gt; <br>
&gt;&gt; --<br>
&gt;&gt; Ignorance is bliss...<br>
&gt;&gt; <a href="https://cullmann.io" rel="noreferrer noreferrer" \
target="_blank">https://cullmann.io</a> | <a href="https://kate-editor.org" \
rel="noreferrer noreferrer" target="_blank">https://kate-editor.org</a><br> &gt; <br>
&gt; <br>
&gt; Links:<br>
&gt; ------<br>
&gt; [1] <a href="http://cullmann.io" rel="noreferrer noreferrer" \
target="_blank">http://cullmann.io</a><br> <br>
-- <br>
Ignorance is bliss...<br>
<a href="https://cullmann.io" rel="noreferrer noreferrer" \
target="_blank">https://cullmann.io</a> | <a href="https://kate-editor.org" \
rel="noreferrer noreferrer" target="_blank">https://kate-editor.org</a><br> \
</blockquote></div></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic