Re: Is GStringChunk still useful?




GStringChunk is fine.

The problem with the case that Jeff highlights is that the strings
inserted are long compared to the chunk size.

In Gnumeric, we use a chunk size of 100k and strings typically 20
characters in the text importer.  (All the substrings in a csv
file, for example.)  The waste is trivial in that case.

So basically, GStringChunk is for when you have *piles* of little
strings to store and malloc overhead is your concern.  If Jeff
really sees strings of ~.5k then malloc overhead is not important.
If the strings are generally smaller, then it is perhaps just his
chunk size that needs to be upped.

Morten



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]