online icon indicating copy to clipboard operation
online copied to clipboard

perf: don't boost / pretty print JSON for colors ...

Open mmeeks opened this issue 1 year ago • 0 comments

It seems that @quikee used the boost::json stuff in error when getting the theme color work done:

svx/source/theme/ThemeColorChangerCommon.cxx-        if (rDocumentColors.size())
svx/source/theme/ThemeColorChangerCommon.cxx-            PaletteManager::generateJSON(aTree, rDocumentColors);
svx/source/theme/ThemeColorChangerCommon.cxx-
svx/source/theme/ThemeColorChangerCommon.cxx-        boost::property_tree::write_json(aStream, aTree);
svx/source/theme/ThemeColorChangerCommon.cxx-
svx/source/theme/ThemeColorChangerCommon.cxx:        SfxLokHelper::notifyAllViews(LOK_CALLBACK_COLOR_PALETTES, OString(aStream.str()));

@grandinj I wonder if you can re-work that to not use that thing; I've seen this code on a profile from @caolanm and wondered why; but it also generates huge, pretty-printed JSON which also seems unfortunate - bandwidth is not free - and 40k of mostly space characters is really not ideal for a message sent on start ;-)

@grandinj any chance we can switch to your nice tools:: JSON writer and get that into 23.05 and 24.05 ? =)

Thanks!

mmeeks avatar Feb 20 '24 16:02 mmeeks