mje Posted August 27, 2008 Report Share Posted August 27, 2008 Hi all, just a general quickie question. You know when you play a game of tracking down your buffer allocations, there are *always* alloc's at the control terminals. This makes perfect sense from a top level VI, where the panel will be visible...the controls maintain their own copy of the data independent of what's being operated on. My question though is with regards to SubVIs...is this allocation "real" if it's not the top level VI? That is if a SubVI is called (and no panel shown), does LV then optimize such that no copy is made? I'm wondering if there's a penalty to passing large data structures through a long call chain due to copying... -michael Quote Link to comment
Aristos Queue Posted August 27, 2008 Report Share Posted August 27, 2008 Remember that the "Show Buffer Allocations" tool does just that -- it shows allocations. IT DOES NOT SHOW COPIES. So there's a buffer location allocated in case the front panel does get shown, but it is not necessarily used. So, no, there is no penalty for calling the subVI due to copying unless 1) the front panel is open when you make the call or 2) if there's a control reference open to one of the front panel controls or 3) the block diagram uses any local variables for that control or 4) the block diagram uses any static-linked property/invoke nodes for that control Quote Link to comment
crelf Posted August 27, 2008 Report Share Posted August 27, 2008 QUOTE (Aristos Queue @ Aug 26 2008, 03:19 PM) Remember that the "Show Buffer Allocations" tool does just that -- it shows allocations. IT DOES NOT SHOW COPIES. So what's the ETA on "Show Copies"? Quote Link to comment
mje Posted August 28, 2008 Author Report Share Posted August 28, 2008 QUOTE (Aristos Queue @ Aug 26 2008, 03:19 PM) So there's a buffer location allocated in case the front panel does get shown, but it is not necessarily used. That makes perfect sense, thanks! Quote Link to comment
Justin Goeres Posted August 28, 2008 Report Share Posted August 28, 2008 QUOTE (MJE @ Aug 26 2008, 10:40 AM) You know when you play a game of tracking down your buffer allocations I believe the canonical name for this pastime is Hide The Dots. . 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.