Accidently missed the list in reply :( Sent for record.
On 29 September 2013 17:23, Павел Рощин <roshin(a)scriptumplus.ru> wrote:
>
> > IIUC what you are seeing here is Scintilla laying out the window for the
> > first time, not just the goto. That still will be done if the
> > editor_goto_pos is not called, just from a delayed idle callback IIUC.
> If
> > its in the order of 3 seconds then I'm not sure delaying it is really
> going
> > to improve the user experience (even though it moves the action out of
> the
> > function you are measuring :)
>
> Profiling shows that loading time was reduced dramatically. And I feel that
> difference as user.
>
Ok, thats good.
>
> > This now ignores the cl_options settings since it doesn't call
> > set_cursor_position() any more :(
>
> It doesn't _only_ if pos == 0. Go to zero position? Imagine I'm trying to
> load
> project with 1000 files. For each document set_cursor_position(0) will be
> called. Why?
>
pos=0 is the default when a new document is opened, only documents in the
previous session will be opened with pos != 0. You need to call
set_cursor_position() to see if any command line options requested a
position other than zero, or you will break opening new documents from the
command line. Note, since the command line options are line and col they
can't be translated into pos until the document is opened, so they can't
pass a pos to document_open().
>
> > Possibly, but you have to ensure that the actions actually happen at some
> > point. Sure you don't have to layout the hidden windows immediately, but
> > does that mean that the first time you swap to a hidden file is slow?
>
> This is the thing called interface responsiveness. For user it's _much_
> better
> to wait 0.02 sec 1000 times when clicking on document than wait 20 sec on
> loading. Most JIT compilers based on this trick: JIT compiler "delays" hot
> loops preferring execution over compiling.
>
Ok, I read your 3s was per file, not the total of 1000 files. If its 1000
files, well I think there are other things to worry about first.
>
> > It is difficult, it has been discussed many times, but neither Geany, nor
> > Ctags, nor tagmanager, nor GTK are thread safe and it would take a major
> > re-design to use them from multiple threads.
>
> I see, but it could be a great improvement. Maybe even make co-routines
> but in
> multicore world it sounds surprisingly.
>
Thats the way it (probably) would be written if it was started now, but
Geany is at least seven years old (according to the oldest commits in git,
but I bet its much older than that). Unless a re-organisation occurs we
are stuck with the current architecture. And ATM there is no effort
available for re-architecting Geany, its a *totally* volunteer project by
people with jobs in the "real" world.
That is not to say that a there could not be a set of small patches that
fix things progressively over time, but they must not break stuff in the
meantime.
>
>
> > Basically the same problem as number 1), plus the difficulty of
> maintaining
> > which tabs are loaded and laid out.
>
> Same answer: responsiveness and again responsiveness. I'm human, if
> computer
> thinks 0.1 sec - I will even don't notice, if interface holds for 10 sec -
> it
> makes me nervous. Maintaining should simple: just add flag "delayed_load"
> and
> toggle it first time user clicked on document. Of course if there are no
> architecture problems.
>
See above :)
>
> > Sad as I am to say it, but maybe those with 1000s of tabs need a
> different
> > editor/ide, Geany's target is "small lightweight and simple" and it is
> > important that it maintains its focus on that.
>
> I tried Eclipse. Without plugins it's functionality is similar to
> Notepad++ but
> it eats 0.5 Gb of memory even without any project. To support all
> languages I
> need for I should download thousands of plugins and now it eatch 1.5 Gb.
> QtCreator is a good but... C++ only. Recently Python was added.
>
> I need Geany for my work - it's huge project and I should handle over 10
> million
> of files with different languages - from TeX to C++. Either I have to open
> 100-s
> of IDE or I can use Geany. I know there are much to do, I'm sure I could
> help
> with developing but let's start with this simple improvement? I'll make PR
> if
> it's easier for you.
>
PRs are welcome :)
Cheers
Lex
>
> --
> Pavel
>