John Lokanis Posted December 9, 2013 Report Share Posted December 9, 2013 This is a very strange problem. I have put together a demo project to demonstrate the speed differences in array vs variant attribute storage methods. I also included a test of different variant database designs to show some pitfalls. I first built this project in the following folder on my machine: C:DevelopmentSourcesandboxVariant Attributes It seemed to be working well and demonstrating the effects I was after. I then moved the folder to my desktop: C:UserslokanisDesktopVariant Attributes When I opened the project from here, and tested it, the demo ran 1000x faster and no longer demonstrated the effect I was after. Next I tried moving it to here: C:tempVariant Attributes And I got a result closer to the original location but still not the same. Here is the code: Variant Attributes.zip Run the VI: "Compare Class Database Storage Methods.vi" Any ideas what is going on? BTW: the point of the demo is to show that storing large elements in a variant database is faster if you store DVRs of the elements. This should avoid large data copies. Quote Link to comment
Ulf Posted December 10, 2013 Report Share Posted December 10, 2013 I can't open or test your example as I'm using LabVIEW 11, but it might be some kind of virus scanning of your file, that affect the execution speed? Quote Link to comment
gleichman Posted December 10, 2013 Report Share Posted December 10, 2013 I ran it from my desktop and a directory off the root and they both gave similar results (~330x). LV2013 and Win7sp1. Did you run it both times from inside the project? Quote Link to comment
John Lokanis Posted December 10, 2013 Author Report Share Posted December 10, 2013 Yes, always from inside the project. I cannot reproduce the 330x result. This is what I get running outside the project from the desktop: Of course, now I get the same results from all locations. Must have been something weird about my machine at the time. (Also running Win7 and LV2013) Quote Link to comment
shoneill Posted December 11, 2013 Report Share Posted December 11, 2013 Ooh this sounds familiar. I had some WEIRD performance issues a few weeks back with the divide primitive taking different amounts of time depending on which values it was dividing, and I mean MEASURABLE differences. Closed the project, re-opened and the issue was completely gone (hopefully) never to be seen again. It seemed at the time like the math libraries had started going a bit wonky. As with all problems of this ethereal type (you look at them properly and they disappear) you end up questioning your sanity and have no change of filing a bug report because noone will be able to reproduce it. Shane. Quote Link to comment
Mellroth Posted December 11, 2013 Report Share Posted December 11, 2013 I also had a similar issue where a simple VI using Variant attribute lookup took a long time to execute if the owning library/class was opened. The time difference was never measured, but running through ~1000 elements was noticeable slower. I tracked this down to be an issue with re-entrancy, once I made the VIs reentrant the execution speed was the same regardless of where it was started. /Jonas Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.