[
Lists Home |
Date Index |
Thread Index
]
- From: Tim Bray <tbray@textuality.com>
- To: Tyler Baker <tyler@infinet.com>, David Brownell <david-b@pacbell.net>
- 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:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|