these changes have to be done in one of the java files in the vrml97.jar
file, right?
but when I open the jar file with winzip I only have the class files, where
can I find the vrml97 open source file?

Am I right?
question from a newbie :(

-----Original Message-----
From: Juergen Neubauer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 12:38
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Java3D VRML Loader (vrml97.jar) gzip files


Hello !

Just in case somebody still uses the old code from SUN and tries to load
big (>1MB) gzip vrml files, I have a hint:

(all following is in the package com.sun.j3d.loaders.vrml97.impl)

Loader.java reads the incomming file byte by byte and there is a call to
ByteBuf.java.
To speed things up, one could simply increase the value for that buffer
(ie: from 1024 to 65536).


Another way is to add a line after "gis = new GZIPInputStream(is);"
(line 315)
which simply assigns the GZIPInput Stream gis to the InputStream is.
- > "is = gis;"

Then comment out the lines from "ByteBuf bb = new ByteBuf();" till
"is.reset();" - altogether 14 lines of code.

Doing this 2 changes bypasses the call to ByteBuf.java and reads a 3MB
file in 14 seconds (instead of 11 Minutes).

If anybody has a reason why the call of ByteBuf is necessary, tell me
please.

If anybody needs additional hints or needs the "patched" vrml97.jar,
feel free to contact me.

-Juergen.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".


**** DISCLAIMER ****
The contents of this e-mail are intended for the named addressee only.
It contains information which may be confidential and which may also be
privileged. Unless you are the named addressee (or authorised to receive
for the addressee) you may not copy or use it, or disclose it to anyone
else. If you received it in error please notify us immediately and then
destroy it. Further, we make every effort to keep our network free from
viruses. However, you do need to verify that this email and any attachments
are free of viruses as we can take no responsibility for any computer virus
which might be transferred by way of this e-mail.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to