Should GraphLayout/parseInstance use IdentityHashMap for GraphPathRecord's?
Andy Fingerhut
andy.fingerhut at gmail.com
Fri Jul 12 08:24:18 UTC 2019
After sending my previous message, and experimenting a bit more with some
possible changes, it was obvious that it is possible, and likely also
preferable, to add new methods to the GraphLayout class, without affecting
the existing API at all, other than by extending it with additional
functionality. So, no breakage for any existing programs that use JOL,
only additional methods that could be called if you want some different
behavior.
I have published one possible set of changes as diffs at the link below:
https://github.com/jafingerhut/cljol/blob/master/doc/jol-dev-ideas/jol-0-9-plus-parseInstanceIds.diff
The new method is: parseInstanceIds
and it takes a second parameter of type Predicate that the caller can use
to cause the GraphLayout walk to not follow references out of objects that
the caller chooses, based on whatever criteria it wants.
If you have chance to look at it, I would be curious if it might be of any
interest for the official JOL code base, and if so, what kinds of changes
would need to be made for it to be acceptable.
Regards,
Andy
More information about the jol-dev
mailing list