Post
by Jeff Luther » 14 Mar 2007, 22:08
Posted by: Jeff Luther
'text files are not meant to be "outlined" ' -- ??? the text outline is simply a
method for TD to use to build the application in memory, Conrado. That includes
building the symbol table, parsing each item so it becomes doubly-linked code
items in memory, etc.
It isn't as if TD just puts the APT into memory and reads down the source
code (much like it would a recipe) to run your application, one line a time.
Unless Gupta changes its memory model and internal structure, XML format seems
to me no better (or worse) than the .head or indent structure it uses now.
As for binary mode, that APP file is really a 'snapshot' (as I recall) of the
memory structure for your application. That's why it reads in fast: the parsing,
building et al an APT requires are already done. Bad news (perhaps) is that
if that binary file is corrupted TD often won't know it, since it looks at the
APP in 'chunks,' not individual outline items. (Which is why there are often
unknown run-time errors that are never caught during design time; TD doesn't
'walk' on that code until it's running.)
And that's why saving in text/APT and reading in that text version is a good
way to 'flush' out any problems a binary/APP file may have, since with text
TD is forced to read in the outline, one line at a time, and rebuild the
entire structure representing your application in memory.
"the memory problems when opening big APT files" - XML won't do a thing for
that, I don't think. My description above is how an APT is read in; that would
be ditto for the outline in XML format; it still has to build the structure
in memory.
A much better question and comment to respond to you are:
-- What specifically are the 'memory problems' you mention?
-- Why on earth have a 23 meg file?!? There are lots of ways to reduce that
size: put code chunks in APD files, put code chunks in separate APL files,
and if all your code is in text format, your MainPgm.app will be much smaller.
Unless you put lots of stuff in APD files, read-in time could still be long,
but unless your application is so *large* that 23meg is over the top and
your PC can't handle that, memory 'problems' shouldn't exist.
And if memory still is a problem, then maybe it's time to divide your appl.
up into multiple, separate EXEs and run your program that way.
Best Regards,
Jeff @ PC Design
info: www.JeffLuther.net/gupta/