Re: [code] TA loading big C file

From: Mitchell <m.att.foicica.com>
Date: Mon, 5 Nov 2012 09:16:56 -0500 (Eastern Standard Time)

Hi John,

On Sat, 3 Nov 2012, John Ferrier wrote:
>
> [snip]
>

Perhaps it is a relic from the past, but for some reason I am inclined to
think Scintilla has trouble with large files, but that may have been long
lines. I will look into this when I have the time. Thanks for bringing it
back to my attention.

> as for textadept, I did a very interesting test, where I first
> loaded  a relatively small C file with TA, then did the copy/paste many
> time to increase the number of lines, and finally saved the file. I
> found TA was able to do the syntax highlighting, but after I savec the
> file and relaunched TA, it failed as I described before. This may imply
> that there is room to improve the algorithm for syntax highlighting.

Scintilla keeps track of the last position it knows is highlighted
correctly and only passes the rest of the text to the lexer. Each time you
paste, only the new text is highlighted and the highlight position is
incremented again. If you were to go back to the top of the file and
change something, then perhaps you would get a memory error.

> Another small bug I found during the tests is TA didn't display the
> line number >= 10000.

Your line margin is not big enough. You can change it in your theme's
view.lua. There was also a code snippet floating around for automatically
changing the width if the number of lines grew to a certain point.

Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 05 Nov 2012 - 09:16:56 EST

This archive was generated by hypermail 2.2.0 : Tue 06 Nov 2012 - 06:54:40 EST