LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Queues creating in an optimum manner

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?

pushkin_0-1632969282747.png

 

Or this just not an issue?

I presume the same logic applies to array structures.

 

Regards JC.......

0 Kudos
Message 1 of 5
(1,156 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 5
(1,154 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 5
(1,097 Views)

@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.

Matt J | National Instruments | CLA
0 Kudos
Message 4 of 5
(1,080 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(1,070 Views)