I'm trying to optimize an app that makes a lot of RMI calls. According to JProfiler, more than 30% of the CPU time is spent in the sun.rmi.server.LoaderHandler.urlsToPath()
method, which is apparently getting called during marshaling. This method calls URL.toExternalForm()
Is that normal? I haven't yet figured out which objects are getting serialized exactly, but it seems like an odd bottleneck.
What is the purpose of LoadHandler.urlsToPath()
, and what can I do to reduce its usage?