URLResourceReader caches jars in memory

7 views
Skip to first unread message

Brad Wood

unread,
Oct 24, 2018, 1:22:51 PM10/24/18
to javaloader-dev
This is a long shot, but does anyone know why this class


caches the entire binary contents of jars in memory?  I'm not talking about loading the classes, just reading the jar off disk and putting it in a byte array in memory.

I noticed it when analyzing some heap dumps of a Java process and I saw Javaloader was consuming a chunk of RAM due to this.  I'm just trying to figure out if there's a specific purpose for this since I assume the jar only needs read once when its classloaded so I'm not sure what the point of keeping the binary in heap is.  There is a "cache" parameter I can pass in, but it always gets set to true for individual files with no way to override.

Thanks!

~Brad
Reply all
Reply to author
Forward
0 new messages