getInstancesSize
getInstancesSize(jdo: JadeDynamicObject input): Integer64;
The getInstancesSize method of the Class class returns the total byte size of all persistent instances of the receiving class. This includes the size of the fixed object overhead for each object, all embedded properties, and all subobjects that have been instantiated for persistent instances of the class; that is, blobs, exclusive collections, and dynamic property clusters.
The optional JadeDynamicObject, specified in the jdo parameter, is populated with the following properties.
| Property | Return Type | Contains... |
|---|---|---|
| thisClass | Object |
Class oid |
| instanceSize | Integer64 |
Size of the instance, excluding subobjects and clusters |
| instanceCount | Integer64 |
Number of instances |
| blobsCount | Integer64 |
Number of blob instances, including slobs and slobUtf8s |
| blobsSize | Integer64 |
Total size of blob instances, including slobs and slobUtf8s |
| collectionsCount | Integer64 |
Number of exclusive collection instances |
| collectionsSize | Integer64 |
Total size of exclusive collection instances |
| clustersCount | Integer64 |
Number of cluster instances |
| clustersSize | instanceCount |
Total size of cluster instances |
This method employs a database method to retrieve references to subobject instances directly from the physical database, to reduce the overhead of doing an IO for every subobject to see if it has been created. This should be more performant for large data sets, especially with classes with a lot of exclusive collections that have not been instantiated.
For additional consideration when using this method, see "Caveat When Handling Persistent Class Instances", elsewhere in this document.
2022.0.06, 2025 R2, and higher
