[fpc-devel] Memory consumed by strings

Sergei Gorelkin sergei_gorelkin at mail.ru
Sun Nov 23 10:53:55 CET 2008


Graeme Geldenhuys wrote:
> On Sun, Nov 23, 2008 at 10:19 AM, Mattias Gaertner
> <nc-gaertnma at netcologne.de> wrote:
>> On Sat, 22 Nov 2008 23:05:43 +0200
>> For example the lazarus IDE typically holds 50 to 200mb sources in
>> memory. If this would be changed to unicodestring (2 byte per char) then
>> the IDE would need 50 to 200mb more memory.
> 
> Ah, and that would probably explain why Martin decided not to
> pre-parse units in MSEide - for things like code complection etc...
> MSEide's memory usage would balloon greatly, compared to Lazarus.
> 
One can always choose the string type which is most appropriate for the 
given task. For storing Pascal (or whatever) sources, one choice is not 
to use plaintext at all, but replace each identifier with its index in a 
dictionary. It depends on the task.

Regards,
Sergei



More information about the fpc-devel mailing list