09-21-2015 05:59 AM
Hi,
I have a base packed library [say PPL1] which contains all reusables and another packed library [say PPL2] which has some post processing module. PPL2 is using the VIs from PPL1 and PPL2 has the Process.VI
I am also having a Main.VI which has subpanel loads Process.vi from PPL2.
Test Case:
1. I have opend the PPL1, run the Process.VI source code ==> post processing consumes ~30sec
2. I have built the PPL1 and PPL2 and built the Exe for Main.vi.
When I run the exe which loads the Process.vi from PPL2 into subpannel -> Post processing consumes ~34sec
Note, PPLs are built in release mode, SSE2 disabled. Using LabVIEW 2014. Input data for post processing is same for the above two test cases.
Could you please help me in understanding why there is a variation in above two test cases? I believe executable should be faster than the source code, but here Source code is faster than the exe??
Thanks,
SM
09-21-2015 06:05 AM
When you're loading from the PPL, the application has to load all of the files in the PPL from disk, which is much slower than from memory.
You are right, the compiled code should be at least as fast as the source code (if not faster) but that's assuming everything is in memory which it isn't when you're using PPLs.
(That's my best guess anyway, it depends a bit on how you're calling the VIs in the PPL etc.)
09-21-2015 06:30 AM
Thank you Sam for the reply...
We are having 'Initialize' methods in PPL1 and PPL2 which will be called at the start of Main.vi...Therefore, these two PPLs will be loaded in the memory before Process.vi loads.
Ref: Point:2 @ http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/caveats_recommend_packed/
Thanks,
SM