Hello Dave,

Tuesday, April 14, 2009, 5:11:00 PM, you wrote:

>> In the other hand, use of a TFileStream to read byte by byte is
>> overkill.

DC> True, but I'm going through the file looking for a particular
DC> character $1B and assigning data to different dynamic arrays based on
DC> the byte following the <ESC> byte.

Anyway, use some kind of cache, each read operation involves a
complete read from disk (disk cache mostly) and a transition between
user mode to kernel mode and viceversa. Using a simple 4 Kb cache will
raise the performance 100 or 1000 times.

-- 
Best regards,
 JoshyFun

_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to