FastSaxSerializer::write ...

Mark Hung marklh9 at gmail.com
Sat Jan 16 05:36:45 PST 2016


Hi Michael,

I'd look into performance issue.
Is there any benchmark or unit test that I can use to check performance
enhancement?
And what do you mean by regression test for the characters?


2016-01-16 19:33 GMT+08:00 Michael Meeks <michael.meeks at collabora.com>:

> Hi Mark,
>
>         Great to see:
>
> commit e99f22bbc499ab0566621ee0bb01e4a7747efe76
> Author: Mark Hung <marklh9 at gmail.com>
> Date:   Sun Jan 10 00:28:14 2016 +0800
>
>     Fix FastSaxSerializer::write() for non-BMP unicode characters.
>
>         Clearly we don't want to mangle UTF-16 etc. characters - and the
> code
> looks dodgy indeed for that =)
>
>         I'm somewhat suspicious though that this will cause some unhelpful
> performance regression; and I was wondering if you could look into
> fixing that ? and (ideally) helping out with a regression test for these
> characters ? =)
>
>         Memory allocation of OStrings etc. via rtl/sal is rather expensive
> in
> most of the profiles I've seen; and particularly doing it for every
> attribute ;-)
>
>         Would it be possible to replace the original code - but - as soon
> as we
> hit a non-ASCII character to convert the rest of the string, and write
> that - so something like:
>
>         write (OString(sOutput[i], nLength-i, RTL_TEXTENCODING_UTF8),
> bEscape);
>         return;
>
>         So we can get the character conversion and pairing correct - while
> keeping the lack of allocation there ? =)
>
>         Anyhow - thanks muchly for the fix ! great to see complex text
> support
> improve.
>
>         All the best,
>
>                 Michael.
>
> --
>  michael.meeks at collabora.com  <><, Pseudo Engineer, itinerant idiot
>
>


-- 
Mark Hung
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20160116/af927dc4/attachment.html>


More information about the LibreOffice mailing list