09-29-2021 09:49 PM
Hi.
I am curious if a programmer can optimize the process when obtaining a queue by indicating the size of a datatype (, when creating it).
If I know that the number of characters is 24 (or less) in the example below, is this helping the process?
Or this just not an issue?
I presume the same logic applies to array structures.
Regards JC.......
09-29-2021 10:01 PM
It's a non-issue. Also, do you really need the frame structure? Generally they are not used and you should rely on data flow to control the flow of your application.
09-30-2021 06:46 AM
By definition, strings are not fixed size and you cannot guarantee the string will not grow beyond what the initial string is. So, no, you cannot do any optimizations at the initialization.
09-30-2021 10:09 AM
@crossrulz wrote:
By definition, strings are not fixed size and you cannot guarantee the string will not grow beyond what the initial string is. So, no, you cannot do any optimizations at the initialization.
Even if you could, would it matter? I haven't done any testing but I wouldn't expect obtain queue to copy any of the underlying data so I would expect the size of the elements to be irrelevant even if they could be defined.
09-30-2021 11:44 AM
@Jacobson-ni wrote:
@crossrulz wrote:
By definition, strings are not fixed size and you cannot guarantee the string will not grow beyond what the initial string is. So, no, you cannot do any optimizations at the initialization.
Even if you could, would it matter? I haven't done any testing but I wouldn't expect obtain queue to copy any of the underlying data so I would expect the size of the elements to be irrelevant even if they could be defined.
Well, that does bring up the other issue: The Obtain Queue does not allocate the memory for the elements of the queue. The memory for the queue elements are allocated as the queue fills up.