[Lazarus] read text file in lazarus

Christian Iversen chrivers at iversen-net.dk
Sun Apr 5 11:57:59 CEST 2009


waldo kitty wrote:
> Graeme Geldenhuys wrote:
>> On Sat, Apr 4, 2009 at 6:13 PM, waldo kitty <wkitty42 at windstream.net> wrote:
>>> my thoughts exactly... and folk wonder why today's programs are so bloated,
>>> slow, memory hogs and require a mini-cray just to operate with some decency of
>>> speed ;)
>> Very true!  Just curious, how do you know how much memory an
>> application uses? Preferably a Linux and Windows method.
> 
> i was looking at the simple fact that most of today's coders and processes read 
> entire datafiles into memory... i know that some of those i work with are over 
> 300Meg and there's no way i want to tie up that much memory... i won't even 
> speak of the time it can take to load it all but that is dependent on the 
> machine doing the work, too... not all of us have the latest and greatest core 
> duo or quads or what have you... most of my machines are gimmes from upgrades 
> done at the local hospital and factories when they toss out their old stuff for 
> newer...

Well you didn't tell us that. When the data files become that size, you 
really move from a data file approach to a database approach.

And for this, text files are just not that great. If you really have 
files in the size of 300mb+, you should look at something like sqlite. 
Depending on your use case, it's almost certainly going to help a lot 
and prevent you from re-inventing the wheel.

-- 
Med venlig hilsen
Christian Iversen



More information about the Lazarus mailing list