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