Mega Internals - Memory Allocation Or Building Collection
I am writing a script that is expected to process a large amount of information and involve a large number of repository objects, particularly in ad-hoc collections. To ensure efficient and quick execution I would like to understand the internal schemes for creating object collections that are returned under different scenarios, which are:
- run a database query using oObject.GetSelection("Select ..."): pass memory reference to prexisting collection or generate collection (assume the latter) ?
- get all objects of a specific class e.g. Org-Unit connected to an object (from the root or any other object) e.g. oObject.GetCollection("Org-Unit") - is this a pre-existing collection to which a memory reference is returned or is the collection, created, built and returned?
- a collection of mixed class types related to an object e.g. oObject.GetProp("Dependency") or oObject.GetCollection("Aggregation Of") - reference to pre-existing collection or collection built on request?
Is there any advice on which methods are to be preferred for efficiency reasons?
Re: Mega Internals - Memory Allocation Or Building Collection
hello Mr. HOLLONG,
I inform you that when we call a collection of type object.getCollection(“Org-Unit”) for the first time the collection is created and saved in the cache: if we call it another time it’s not created but referenced from the cache.
For the collection of type object.getCollection(“Select…”), for each execution a new collection is created
So the first type of collection is the more optimal
There is no difference between a collection of a specific class or a collection of mixed class types.
Note that in standard HOPEX installation a certificate is installed with expiration on 3rd of February 2020. If your installation cease to work, please have your administrator sign-in and download the new certificate. Thank you for your understanding. Download Certificate+