Re: slow startup on windows
Roland Hughes via Foxgui-users <[email protected]> Fri, 25 Oct 2024 17:01:42 -0500
| Newsgroups | gmane.comp.lib.fox-toolkit.user |
|---|---|
| Message-ID | <[email protected]> |
Thank God for COBOL. https://www.mainframestechhelp.com/examples/cobol/array.htm I don't know if my image will get through the list. You need the beauty of fixed length strings. For 4 dimensions you just have a packed struct with 4 fixed length strings, not FXString objects. Then you do one huge malloc at program start. I haven't looked under the hood of Fox for a while, but most graphical string classes aren't "just storing ASCII bytes." Most have a UTF encoding, then they assign a font or at least calculate the display width in case it is needed, etc. In-memory SQLite table is still the path of best design though. On 10/25/2024 9:55 AM, [email protected] wrote: > 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. > > -- Roland Hughes, President Logikal Solutions (630)-205-1593 (cell) https://theminimumyouneedtoknow.com https://infiniteexposure.net https://johnsmith-book.com _______________________________________________ Foxgui-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/foxgui-users