<div dir="ltr">Hi Michael,<div><br></div><div>I'd look into performance issue. </div><div>Is there any benchmark or unit test that I can use to check performance enhancement? </div><div>And what do you mean by regression test for the characters?</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-01-16 19:33 GMT+08:00 Michael Meeks <span dir="ltr"><<a href="mailto:michael.meeks@collabora.com" target="_blank">michael.meeks@collabora.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mark,<br>
<br>
        Great to see:<br>
<br>
commit e99f22bbc499ab0566621ee0bb01e4a7747efe76<br>
Author: Mark Hung <<a href="mailto:marklh9@gmail.com">marklh9@gmail.com</a>><br>
Date:   Sun Jan 10 00:28:14 2016 +0800<br>
<br>
    Fix FastSaxSerializer::write() for non-BMP unicode characters.<br>
<br>
        Clearly we don't want to mangle UTF-16 etc. characters - and the code<br>
looks dodgy indeed for that =)<br>
<br>
        I'm somewhat suspicious though that this will cause some unhelpful<br>
performance regression; and I was wondering if you could look into<br>
fixing that ? and (ideally) helping out with a regression test for these<br>
characters ? =)<br>
<br>
        Memory allocation of OStrings etc. via rtl/sal is rather expensive in<br>
most of the profiles I've seen; and particularly doing it for every<br>
attribute ;-)<br>
<br>
        Would it be possible to replace the original code - but - as soon as we<br>
hit a non-ASCII character to convert the rest of the string, and write<br>
that - so something like:<br>
<br>
        write (OString(sOutput[i], nLength-i, RTL_TEXTENCODING_UTF8), bEscape);<br>
        return;<br>
<br>
        So we can get the character conversion and pairing correct - while<br>
keeping the lack of allocation there ? =)<br>
<br>
        Anyhow - thanks muchly for the fix ! great to see complex text support<br>
improve.<br>
<br>
        All the best,<br>
<br>
                Michael.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
 <a href="mailto:michael.meeks@collabora.com">michael.meeks@collabora.com</a>  <><, Pseudo Engineer, itinerant idiot<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Mark Hung<br></div></div></div>
</div>