[Geany-devel] [patch] Improved documents list sorting

Enrico Tröger enrico.troeger at xxxxx
Tue Apr 27 16:10:19 UTC 2010


On Tue, 27 Apr 2010 18:05:05 +0200, Colomban wrote:

>Enrico Tröger a écrit :
>> On Tue, 27 Apr 2010 16:54:48 +0200, Enrico wrote:
>> 
>>> On Mon, 26 Apr 2010 15:42:25 +0200, Colomban wrote:
>>>
>>>> Hi!
>>> Ho!
>Hey!
>
>>> It might be better to take the more memory to get a little more
>>> speed, i.e. to not loose too much speed :(. 
>>> Sorting of the list happens on each newly opened document and maybe
>>> on closing documents and even when switching tabs as I just noticed
>>> while
>> 
>> We don't re-sort on closing documents.
>> So, in contrary to my previous opinion, I'd vote to go the easy way
>> and compute the keys on each run instead of polluting the memory.
>I just did naive and inexact benchmarks (with a watch, haha), and it
>seems that the naive solution is not so slow (tested with "only" 300
>files: 122s vs 125s [1]); and the more complex solution seems to be as
>fast as without any special sorting function.
>So I think I'll vote too for the naive solution - and anyway, is there
>anybody here that uses an editor with 300 files at once?

Not 300, but I recently noticed that I'm working with more than 100
currently open files at work. Didn't expected that, I just thought 'uh,
many open files' but having a look on the status messages, told me I
had some 120 files open or so. I never ever expected that someone uses
Geany that way and then, this someone was even me...:).


>Offtopic:
>But but but… opening 300 empty files with no filetype (loaded as None)
>took more than 120s! Even though Gedit took 89s to load the same 300
>files, I think there is a little problem somewhere. Investigating this
>would be interesting.

I doubt it would be interesting but necessary.
I noticed this long time ago already and it's quite annoying and needs
to be fixed. My first guess without having done any investigations, we
are doing too much UI updating stuff on bulk loading of files (e.g.
the previously mentioned resorting of the document list, there are
probably many more such issues).

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20100427/ec40104c/attachment.pgp>


More information about the Devel mailing list