[Geany-Devel] Geany performance

Lex Trotman elextr at xxxxx
Sun Sep 29 11:18:54 UTC 2013

On 29 September 2013 20:53, Pavel Roschin <rpg89 at post.ru> wrote:

> > Well, the costly part is the rendering, which happens from a delayed GTK
> > idle callback inside scintilla.  As Matthew said when the text is
> inserted
> > into the buffer the cursor is at the end, getting it back to the start
> > before the rendering is important, the less of the text Scintilla renders
> > the better, and if the position is set at zero it *should* only render
> the
> > start of the text, not the whole file, which would happen if the position
> > was still at the end.
> I didn't noticed that somewhere cursor placed at end of file.

When the file is loaded the text is set in the Scintilla buffer, which is
an insert, and the cursor is always after any insert, ie at the end.  Its
not an explicit set position command.

> Geany calls
> set_cursor_position several times. But actually goto isn't bottleneck, only
> SCI_ENSUREVISIBLE slows things down.

Hmmm, bearing in mind we are now talking about the internals of the
scintilla implementation of (one of) its backends.  It sort of makes sense
that an "ensure visible" operation requires the lexer to be run to find the
fold points so it can check that they are unfolded, and it is conceivable
that checking visibility might require rendering as well (for the purpose
of measuring what text fits on the screen, not actual display). And those
then have to be done immediately, not delayed.  All of which adds to the
the overhead.


> P.S. I hope now all messages are correct? I had a troubles with my mail
> filters.

Sadly no, it still cced me directly, that means the default reply to is to
you, not the list, thats because the list message arrives second and is
hidden since its a copy.

> --
> Best regards,
> Pavel Roschin aka RPG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20130929/fcf598e3/attachment-0001.html>

More information about the Devel mailing list