customer classloader slow in 1.4.2

T

Troy Makaro

Help! I wrote a custom classloader which extends URLClassloader. Its
working great with java 1.4.1_01-b01. The first time the classloader is
used it take about 2 seconds or less. When I went up to java 1.4.2 it
now takes about 2 minutes the first time! What the heck gives? Also,
I've noticed this problem with java 1.3.1 too.

After trying to figure out what the heck was taking so long it turned
out to be a method in URLClassloader not my code. It looks to me like
SUN broke it.
 
A

Andreas Wollschlaeger

Troy said:
Help! I wrote a custom classloader which extends URLClassloader. Its
working great with java 1.4.1_01-b01. The first time the classloader is
used it take about 2 seconds or less. When I went up to java 1.4.2 it
now takes about 2 minutes the first time! What the heck gives? Also,
I've noticed this problem with java 1.3.1 too.

After trying to figure out what the heck was taking so long it turned
out to be a method in URLClassloader not my code. It looks to me like
SUN broke it.

Well err if you told us what's special about your classloader and
*what* method in URLClassloader is broken - maybe we could learn
something. Maybe we could even fix it :)

Cheers
Andreas
 
D

Dave Glasser

Help! I wrote a custom classloader which extends URLClassloader. Its
working great with java 1.4.1_01-b01. The first time the classloader is
used it take about 2 seconds or less. When I went up to java 1.4.2 it
now takes about 2 minutes the first time! What the heck gives? Also,
I've noticed this problem with java 1.3.1 too.

After trying to figure out what the heck was taking so long it turned
out to be a method in URLClassloader not my code. It looks to me like
SUN broke it.

I have a custom classloader that also extends URLClassloader (as I
suspect most do.) It works fine under 1.4.2. The URLs from which it
loads classes are for local jar files, however.
 
T

Troy Makaro

Mine works too. Its just super slow the first time as in about 2
minutes. After that it loads them instantly. My question is why does
this work perfectly using java 1.4.1_01-b01? Also, I can read jars but
the urls I added to the classloader are to folders on the local disk. If
that even matters.
 
M

Michael Borgwardt

Troy said:
Help! I wrote a custom classloader which extends URLClassloader. Its
working great with java 1.4.1_01-b01. The first time the classloader is
used it take about 2 seconds or less. When I went up to java 1.4.2 it
now takes about 2 minutes the first time! What the heck gives?

Sounds to me like you're running into some sort of network timeout.
Also, I've noticed this problem with java 1.3.1 too.

After trying to figure out what the heck was taking so long it turned
out to be a method in URLClassloader not my code. It looks to me like
SUN broke it.

Either that, or your usage of that method is problematic.

We can't tell if you don't give more specific information.
 

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

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