LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

unflatten from string takes long time to execute in x64

Hi All,

 

I am running into an issue where "Unflatten from String" is taking enormous amout of memory n time in LV 2012 SP1 x64 to execute. I pass in a NOT flattened string to this function and it consumes ~5 Gigs of memory and takes more than 10 minutes to execute it. On x86, it executes almost instantly.

 

It only happens if the input is not a flattened string. 

 

Is this a known bug?

 

I have attached the vi here for you to see the problem. If you run it on x64, it might take more than 10 mins to execute and your system will be in a hung state. 

 

 

-

Ritesh

0 Kudos
Message 1 of 6
(2,401 Views)

With 32-bit LV2013SP1 running on an x64 machine is good. Are you using the 64-bit version of LV?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 6
(2,389 Views)

Does that "x64" mean you are running 64-bit LabVIEW, or that you are running it on a 64-bit Windows OS?

 

I ran your code on my Win 7 64-bit and it ran fine.  It gave error 116.  Which makes sense because you are trying to unflatten the "hello world" string.  Why are you trying to do that?  It can't unflatten it because it doesn't have the proper bytes prepended to it that tell the length of the string.  It things the length of the string is the ascii values of "hell"  which is 6865 6c6c in hex.  Or 1,751,477,356 bytes and the remaining part of your string is nowhere near that long.

Message 3 of 6
(2,388 Views)

With "x64" I meant LV x64. It executes instantly on LV x86 running on Win 64 bit but on LV x64 it takes like eternity. 

 

I know it cannot unflatten it and I want it to return an error. My actual code can receive a flattened or NOT flattened string and I have a case structure which handles different strings differently. 

 

0 Kudos
Message 4 of 6
(2,383 Views)

@LVCoder wrote:

With "x64" I meant LV x64. It executes instantly on LV x86 running on Win 64 bit but on LV x64 it takes like eternity. 

 

I know it cannot unflatten it and I want it to return an error. My actual code can receive a flattened or NOT flattened string and I have a case structure which handles different strings differently. 

 


makes some sense a 32 bit applcation cann't have a string longer than the memory it can address but in a 64 bit app you can have strings as long as hell.  it takes longer to  unflatten a string that is as long as hell but a 32 bit app would be damned if it will even try to make sence of the string and throws an error right away.


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 6
(2,378 Views)

@LVCoder wrote:

With "x64" I meant LV x64. It executes instantly on LV x86 running on Win 64 bit but on LV x64 it takes like eternity. 

 

I know it cannot unflatten it and I want it to return an error. My actual code can receive a flattened or NOT flattened string and I have a case structure which handles different strings differently. 

 



Be careful with that terminology, it only applies to the Windows Operating System with respect to 32-bit and 64-bit processors.  There is no such thing as LabVIEW x64, or LabVIEW x86.  The property terminology is LabVIEW 32-bit (the most common one, most people use, even on 64-bit OS's since it is the most fully supported), and LabVIEW 64-bit (not commonly used, doesn't have full support of all add-on modules and toolkits, and is mainly only used by people who need LabVIEW to analyze very large datasets.)

0 Kudos
Message 6 of 6
(2,360 Views)