Commit Graph

5 Commits

Author SHA1 Message Date
Tor Lillqvist
bb72ad2969 WaE: implicit conversion of NULL constant to 'nullptr_t'
Change-Id: I23a85ba05a596b566be35ebecc6b1804c0d0cb62
2014-10-23 21:28:29 +03:00
Matúš Kukan
0c24faee6b FastSerializer: Also use cache for writing to ForMerge if we are inside mark()
To ensure the correct order of calling ForMerge methods,
call flush always before touching maMarkStack.

This was the missing piece in optimizing write() methods,
because of writeBytes() checking each time what to call.
E.g. for Calc documents we don't use maMarkStack at all.
So, just transfer the output to proper "ForMerge" when inside mark()
and allow optimizations.
This commit makes write() methods almost 1/3 as fast.

Change-Id: I96c13888206c81f87e29b998839f78ea9d5570af
2014-10-23 14:30:29 +02:00
Matúš Kukan
03040ac23b FastSerializer: Use fixed sized Sequence directly as cache
Well, at least the allocated space is fixed size.
When passing that to XOutputStream, change the size in a hacky way.

Change-Id: I24fa134286e3086beda25c9a6915549e7c69119a
2014-10-23 14:30:28 +02:00
Matúš Kukan
dbbbea6662 FastSerializer: Simplify cache to be fixed sized buffer
This makes writeBytes(), which is called a lot, simpler and thus faster.
E.g. for ~15m calls, this saves ~110m pcycles.

Change-Id: I29d01a1a8651f668aff574e0f015cd2f018eb1cd
2014-10-23 13:24:25 +02:00
Matúš Kukan
ea052e766a FastSerializer: Have own fast cache buffer implementation for XOutputStream
Previously comphelper::OSequenceOutputStream was used.

Change-Id: I4dc38c8c62422e59efa1071312497364cdf5be3c
2014-10-23 11:53:18 +02:00