how fast will be java.lang.instrument.Instrumentation.getObjectSize()?

Trying to make a decent sizeof() implementation, I end up, fully optimized, with a 0.3 ms for a 12k object tree with ~200 disctinct object, 16 class types, on a p3, 800mhz.

This is awfully long.

We want to limit our data queues by real size, not object count.

I was wondering how fast can we expect the Instrumentation.getObjectSize() method be?

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/instrument/Instrumentation.html#getObjectSize(java.lang.Object)

Thanks.

[518 byte] By [desd1012] at [2007-9-30 11:04:31]
# 1
Instrumentation.getObjectSize() DOESN'T WORK.It returns 16 (object itself only) instead of the object tree 12k.
desd1012 at 2007-7-3 22:37:45 > top of Java-index,Administration Tools,Sun Connection...