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?
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.
Ok, the re-sorting on tab switching was wrong and should be fixed in SVN now. Not strictly related to whole topic but nice that we found it by talking about the topic :).
Nice one :)
Regards, Colomban
[1] But this is not precise, might be actually 123s vs. 124s…