Re: slow startup on windows

[email protected] Fri, 25 Oct 2024 09:55:22 -0500
Newsgroups gmane.comp.lib.fox-toolkit.user
Message-ID <[email protected]>
On 2024-10-25 09:27, Enno Rehling wrote:
> I second what Roland says, don't load all those strings into memory,
> or at least not into FXString objects, if you can at all help it.

Definitely true, but we have sh*tloads of ram these days and I could
load the complete works of william shakespeare in RAM and not remotely
tax the amount of memory of even a raspberry pi.

At an average sentence length of 80 bytes, times 500,000 is only 40 MB.
Size of a single uncompressed 4K image...

It *is* a lot of mallocs() if each of these is an individual block,
each taking perhaps 2000 cycles to allocate, so on a 1GHz CPU takes
around 1 second.

40MB at modern RAM speeds may take around 1ms to write to RAM, but
it will take less because modern CPUs have L3 caches bigger than 40MB
so it'll be all cached.

Basically, there's almost nothing you can do with text that would even
remotely tax a modern machine...


   -- JVZ