Lists Home |
Date Index |
- From: Tim Bray <firstname.lastname@example.org>
- To: Tyler Baker <email@example.com>, David Brownell <firstname.lastname@example.org>
- Date: Sun, 21 Nov 1999 09:08:30 -0800
At 07:28 PM 11/18/99 -0500, Tyler Baker wrote:
>Other Java XML parsers I have seen use a similiar approach
>except that the store the character bitmap in the class file itself which has the unfortunate
>problem of bloating the size of your class file immensely, and slowing down startup time
>because the stupid way Java deals with constant arrays of primitive types in classes is that
>it generates instructions for initializing each section of the array to the desired value
>instead of just having a stream of bytes that are read into the array one by one.
Yes, indeed, Java is megastupid this way. The workaround I ended up with was
smashing all the numbers together into a big String, which still makes a
large-ish class file (but you're going to have to transmit that data
one way or another anyhow), but only one run-time push statement.
To use the data, there are a variety of tricks available dependig what it
is you've mashed into the String; in my case String.toCharArray() did
the trick. -T.
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)