pre-init / strings ...

Michael Meeks michael.meeks at
Mon Dec 11 22:06:00 UTC 2017

Hi Stephan

On 08/12/17 16:20, Stephan Bergmann wrote:
>>> So, it would be interesting to know whether the issue indeed is mostly
>>> with such rtl_uString instances, so that the mechanism I outlined above
>>> would be going to sufficiently solve your issue.
> That's why I mentioned that it is "potentially being available in Clang
> or GCC even before; it already is, in a form almost usable for our
> needs".  My assumption would be that we could get this at least into
> dedicated Linux builds rather "soon-ish", with other builds gracefully
> falling back to the status quo.

	Fair enough; so - the problem is working out where a string came from
after the fact is rather problematic ;-)

	I spent a while to create some code that scans for and dumps strings
and add it to loolmap:

SStrings      :                  50, 77 chars
UStrings      :               65021, 1053049 chars

	You can see a dump of all the things that look like ASCII strings in
memory here:

	Some clearly come from the code - but a lot look like they come from
the services.rdb and filter configuration, and a rather large number of
them look like they are from the officecfg. It gives some good hints for
where an additional 'intern()' or two might save quite some memory I
think; we have approaching 200kB of repetitions of '' too,
6k lots of "en-US" etc. etc.

	Looking at that lot, I suspect that the pre-init allocator does indeed
make quite some sense, but have a poke & see what you think.



michael.meeks at <><, Pseudo Engineer, itinerant idiot

More information about the LibreOffice mailing list