binary XML ?

A

Andrew Neiderer

I am sort of new to XML and SVG. So if this has been addressed before please
be patient and/or just point me to a URL.

I have written a Java application which generates lots (150 x 150)
of Scaleable Vector Graphics (SVG), which is a 2D XML application, <rect>s.
The problem is that it takes about 10 seconds to display the frame. I need
to approach real-time display if possible. So I thought a binary representation
of the data would speed it up.

Is binary XML a possibility, or should I not use an XML approach. Maybe it
doesn't even make sense and I should avoid SVG.

Any advice is appreciated.

Thank you.

- Andrew M. Neiderer
 
?

=?ISO-8859-1?Q?J=FCrgen_Kahrs?=

Andrew said:
I have written a Java application which generates lots (150 x 150)
of Scaleable Vector Graphics (SVG), which is a 2D XML application, <rect>s.
The problem is that it takes about 10 seconds to display the frame. I need
to approach real-time display if possible. So I thought a binary representation
of the data would speed it up.

Do you really think that the XML representation of your
data is responsible for the slow display ? I would rather
guess that your Java implementation of the display is to
be blamed.
Is binary XML a possibility, or should I not use an XML approach. Maybe it
doesn't even make sense and I should avoid SVG.

Binary XML has been talked about several times here.
It looks like Microsoft will set a standard for storing
XML binarily when their new MS Word application is released.
Remember that uncompressing a binary needs even more time.

I bet that the bottleneck in your application is SVG,
its interpretation and the rest of the display process.
 
G

Gale

Andrew said:
I am sort of new to XML and SVG. So if this has been addressed before please
be patient and/or just point me to a URL.

I have written a Java application which generates lots (150 x 150)
of Scaleable Vector Graphics (SVG), which is a 2D XML application, <rect>s.
The problem is that it takes about 10 seconds to display the frame. I need
to approach real-time display if possible. So I thought a binary representation
of the data would speed it up.

Is binary XML a possibility, or should I not use an XML approach. Maybe it
doesn't even make sense and I should avoid SVG.

Any advice is appreciated.

Thank you.

- Andrew M. Neiderer
you can't insert binary data in xml file, but you can define extern
Entity, or you can use Unicode to encode the data and insert it directly
to xml (you could find some problems if you use schema)
 
A

alan

I am sort of new to XML and SVG. So if this has been addressed before please
be patient and/or just point me to a URL.

I have written a Java application which generates lots (150 x 150) of
Scaleable Vector Graphics (SVG), which is a 2D XML application, <rect>s.
The problem is that it takes about 10 seconds to display the frame. I need
to approach real-time display if possible. So I thought a binary
representation of the data would speed it up.
Is binary XML a possibility, or should I not use an XML approach. Maybe it
doesn't even make sense and I should avoid SVG.

SVG is still early, but...

Did you do an profiling? Are you assuming that the delay is in the XML
parser?
 
P

Peter Flynn

Andrew said:
I am sort of new to XML and SVG. So if this has been addressed before
please
be patient and/or just point me to a URL.

I have written a Java application which generates lots (150 x 150)
of Scaleable Vector Graphics (SVG), which is a 2D XML application,
<rect>s.
The problem is that it takes about 10 seconds to display the frame. I
need
to approach real-time display if possible. So I thought a binary
representation of the data would speed it up.

Is binary XML a possibility, or should I not use an XML approach. Maybe
it doesn't even make sense and I should avoid SVG.

Binary XML comes up from time to time and the answer is in the FAQ at
http://xml.silmaril.ie/authors/graphics/

* XML is a text format, so you can't embed raw binary in it. Period.

* You *could* embed it in some coded format, eg Base64 or UUencode,
but there would be a processing overhead to decode it.

* You *can* zip up a whole file (ie compress for transmission) if
you know that your readers are equipped to unzip it the other end.
(For example, OpenOffice already stores its documents as zipped XML.)

///Peter
 
J

Jaco

Peter said:
Andrew Neiderer wrote:




Binary XML comes up from time to time and the answer is in the FAQ at
http://xml.silmaril.ie/authors/graphics/

* XML is a text format, so you can't embed raw binary in it. Period.

* You *could* embed it in some coded format, eg Base64 or UUencode,
but there would be a processing overhead to decode it.

* You *can* zip up a whole file (ie compress for transmission) if
you know that your readers are equipped to unzip it the other end.
(For example, OpenOffice already stores its documents as zipped XML.)

///Peter

It would be nice if there was an API for reading directly from zipped
XML files without needing to unzip first. That could be even faster than
reading from uncompressed XML files.
 
G

Gerald Aichholzer

Jaco said:
Peter said:
Andrew Neiderer wrote:

[...]

Is binary XML a possibility, or should I not use an XML approach. Maybe
it doesn't even make sense and I should avoid SVG.


Binary XML comes up from time to time and the answer is in the FAQ at
http://xml.silmaril.ie/authors/graphics/

[...]

* You *can* zip up a whole file (ie compress for transmission) if
you know that your readers are equipped to unzip it the other end.
(For example, OpenOffice already stores its documents as zipped XML.)
It would be nice if there was an API for reading directly from zipped
XML files without needing to unzip first. That could be even faster than
reading from uncompressed XML files.

I'm not quite sure, but AFAIR zip cannot be streamed. You need
the whole file to be able to decompress the data. This is the
reason why webservers use gzip for compressing HTML-pages on
the fly.

Gerald
 
S

Steve Jorgensen

Jaco said:
Peter said:
Andrew Neiderer wrote:


[...]

Is binary XML a possibility, or should I not use an XML approach. Maybe
it doesn't even make sense and I should avoid SVG.


Binary XML comes up from time to time and the answer is in the FAQ at
http://xml.silmaril.ie/authors/graphics/

[...]

* You *can* zip up a whole file (ie compress for transmission) if
you know that your readers are equipped to unzip it the other end.
(For example, OpenOffice already stores its documents as zipped XML.)
It would be nice if there was an API for reading directly from zipped
XML files without needing to unzip first. That could be even faster than
reading from uncompressed XML files.

I'm not quite sure, but AFAIR zip cannot be streamed. You need
the whole file to be able to decompress the data. This is the
reason why webservers use gzip for compressing HTML-pages on
the fly.

From what I've read of compression algorithms, I think that's not true. Worst
case, you need one whole block of a file before you can decompress that block,
but I don't think you ever need a whole large file before you start
decompressing.
 
G

Gerald Aichholzer

Steve said:
From what I've read of compression algorithms, I think that's not true. Worst
case, you need one whole block of a file before you can decompress that block,
but I don't think you ever need a whole large file before you start
decompressing.

Well, I'm no expert, but HTTP supports several compression methods
(see [1]). Why ZIP is not among the supported algorithms I don't
know exactly. I thought it is because ZIP can't be uncompressed
before the whole file is transferred. This would be a major dis-
advantage when rendering HTML files.

Gerald

[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html
 
P

Peter Flynn

Gerald said:
Steve said:
From what I've read of compression algorithms, I think that's not true.
Worst case, you need one whole block of a file before you can decompress
that block, but I don't think you ever need a whole large file before you
start decompressing.

Well, I'm no expert, but HTTP supports several compression methods
(see [1]). Why ZIP is not among the supported algorithms I don't
know exactly. I thought it is because ZIP can't be uncompressed
before the whole file is transferred. This would be a major dis-
advantage when rendering HTML files.

-- AFAIK Gerald is right: the ZIP format writes its directory at the end
of the file, so you have to have the whole file before you can unpack
it. This is why unzipping multi-floppy ZIP files required you to put
in the last disk of the set before they could start work.

///Peter
 
S

Steve Jorgensen

Gerald said:
Steve said:
On Wed, 17 Aug 2005 22:08:38 +0200, Gerald Aichholzer


I'm not quite sure, but AFAIR zip cannot be streamed. You need
the whole file to be able to decompress the data. This is the
reason why webservers use gzip for compressing HTML-pages on
the fly.


From what I've read of compression algorithms, I think that's not true.
Worst case, you need one whole block of a file before you can decompress
that block, but I don't think you ever need a whole large file before you
start decompressing.

Well, I'm no expert, but HTTP supports several compression methods
(see [1]). Why ZIP is not among the supported algorithms I don't
know exactly. I thought it is because ZIP can't be uncompressed
before the whole file is transferred. This would be a major dis-
advantage when rendering HTML files.

-- AFAIK Gerald is right: the ZIP format writes its directory at the end
of the file, so you have to have the whole file before you can unpack
it. This is why unzipping multi-floppy ZIP files required you to put
in the last disk of the set before they could start work.

///Peter

Well, you're absolutely right. I was reading ZIP, but I was thinking gzip
while I was reading it. gzip is a compression format that -is- intended for
use with streams, and is widely available.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

XSLT ? 1
XML in XMPP 8
Dynamic Values in XML 1
internal CSS 1
SVG with Java <script> 1
xalan versus ie xml rendering 3
XSLT output missing XML elements 7
new here, xml, ebml, iff, and binary xml 3

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top