Hi Berk, <br>
<br>
I was single stepping through the code and it looked to me like xpat is
infact treating the characters as utf8, even though ParaView is only
using ascii characters. There is a test on each character. But this
won't matter anymore as your fixes should remove xpat from the
equation when writing binary data. As a new user I am finding the list invaluable. Thanks so much for you help!<br>
<br>
Bam<br><br><div class="gmail_quote">On Fri, Jul 3, 2009 at 12:34 PM, Berk Geveci <span dir="ltr"><<a href="mailto:berk.geveci@kitware.com">berk.geveci@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Bam,<br>
<br>
You are partially correct. The output is the base64 encoding of<br>
compressed binary data (not utf8 encoded). Still, your point is valid<br>
and writing data this was is slow (and stupid). The XML writers can<br>
write data in a few ways:<br>
<br>
* Data is inlined in the XML section - the data, if binary, has to be<br>
base64 encoded in this case because XML parsers cannot handle raw<br>
binary data. I don't know why we even support this mode. Don't use it.<br>
* Data is appended at the end of the XML section. Here you have the<br>
option of compressing (using zlib) and base64 encoding the data. Why<br>
would you do that? Maybe you want to upload it somewhere as valid XML<br>
or something. I don't know.<br>
<br>
The issue was the fact that we did not expose the right options to<br>
write data as appended, raw binary without compression and encoding. I<br>
fixed this by exposing these setting in the user interface. As of 5<br>
minutes ago, the default behavior is to write the data as appended<br>
raw. I tested the performance. It is still not as good as the old<br>
writers due to reasons too long to explain here but it is close. If<br>
you want to try it out, you will have to build ParaView from source<br>
using the cvs version.<br>
<br>
Best,<br>
-berk<br>
<div><div></div><div class="h5"><br>
On Thu, Jul 2, 2009 at 3:25 PM, Bam Ting<<a href="mailto:bampingting@gmail.com">bampingting@gmail.com</a>> wrote:<br>
> I have noticed that when saving data from ParaView in the XML binary format,<br>
> a binary file is not produced. Please check me on this! I think it is a bug!<br>
><br>
> to reproduce:<br>
><br>
> open ParaView<br>
> sources->mandlebrot<br>
> dims 205,250,250<br>
> File->Save Data-> vti, binary<br>
> File->Save Data-> legacy binary<br>
><br>
> look at the files produced, the XML vti is clearly not a binary file (and by<br>
> the way on windows unix line feeds are used, not sure if that is<br>
> desireable), while the legacy file clearly is a binary file.<br>
><br>
> If I underrstand the XML reader/writer tuple correctly here is a potential<br>
> performance caveat when using the XML reader/writer tuple: Be sure file is<br>
> really binary!!!!<br>
><br>
> When ParaView saves data as vti XML binary, the file is not really binary at<br>
> all but rather base 64 encoded, utf8. This combination could not be slower!<br>
> As the reader reads each character writen this way, it first tests to see<br>
> how many bytes the character has, then does the base 64 conversion to native<br>
> float/double. Operation thus on each character is of course a trerrible idea<br>
> if one cares about performance!<br>
><br>
><br>
> delete the pipeline<br>
> Open both files<br>
> tools->timer log<br>
><br>
> You will likely see that the binary legacy file loads twice as fast as the<br>
> XML.<br>
><br>
> Experts, plz verify I am not smoking crack<br>
> Thx<br>
> Bam<br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
><br>
><br>
</blockquote></div><br>