RE: [code] TA loading big C file

From: John Hind <john.hind.att.zen.co.uk>
Date: Sat, 3 Nov 2012 12:03:38 -0000

Yes, IMHO TA needs some improvements in the way it loads large files. I
tried a 700K byte (6300 lines) HTML/Javascript file and it takes 1min 9 secs
to load! In the JIT version it is faster, about 31 secs, but still not
really acceptable given the UI is unresponsive. Programmers Notepad, another
syntax highlighting Scintilla-based editor, loads the same file in less than
2 secs. I know there is a price to pay for the flexibility of Lua, but
perhaps TA could detect large files and handle them differently? Even if it
just loaded files over a set threshold as plain text. It could then have an
'analyse' command on the menu and present a proper progress bar during the
operation. But ideally it should analyse the file on a separate thread and
present plain text only if the user moves past the point in the file that
the analysis has reached.

If I remember right, Lua has a memory usage limit to trap recursion bugs,
which is probably why it is failing in your case when you still have plenty
of physical memory.

-----Original Message-----
From: John Ferrier [mailto:john_j_ferrier.att.yahoo.com]
Sent: 03 November 2012 01:08
To: code.att.foicica.com
Subject: [code] TA loading big C file

Hi,

I have a big C file (~58M and ~1.5M lines). When I tried to open it with TA
("ta aaa.c") I got:

Lua Error: not enough memory.
Lua Error: Table of tokens expected from lexer.lex.

I have about 2G physical memory. However, if changed the file name and
loaded it as a text file ("ta aaa") then there was no problem.

Regards,

JF

-- 
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.
-- 
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 Sat 03 Nov 2012 - 08:03:38 EDT

This archive was generated by hypermail 2.2.0 : Sun 04 Nov 2012 - 06:33:42 EST