I would like to use the sizeOf() function to monitor the size some data I have cached in Application scope. The documentation (SizeOf() :: Lucee Documentation) says:
This function is experimental, do not use in a production environment.
Is it really still experimental or is the documentation out of date?
If it is experimental, is the risk just that it might return incorrect values or could it cause server problems?
I don’t think that function has been touched since it was first implemented, so I assume it’s still experimental. It basically uses reflection to recursively climb through the entire object graph and try to get the size of each item. For a massive object with references to thousands of other objects, that could perform quite poorly. And I really have no clue how accurate it is. Guessing the “retained heap” of an object is a tricky thing to do and if you really want a solid number, take a heap dump and run it through an analyzer tool.
Thanks. We thought that would be the case.