Jump to content

OpenG Inline Improvements


Recommended Posts

This is likely a discussion that is similar to many others that OpenG has had to discuss but I'm bringing it up anyway.  There are improvements to LabVIEW that could make OpenG better, but OpenG likely wants to keep support for older versions of LabVIEW.  One such improvement is the ability to Inline VIs.  I think that many OpenG VIs should be inlined, this would make them more like primatives where they are reentrant, and at compile time will be inlined into the calling VI reducing the overhead in calling a sub VI.

 

The issue is that Inlineing was added to LabVIEW in 2010, and I believe the minimum version OpenG supports with the newest release is 2009.  OpenG dropped support in the newest build of packages, for 8.6 and older, over 2 years ago.

 

Thoughts?  Objections?  Obviously OpenG will still support older versions of LabVIEW (OpenG version 2.0 goes back to LabVIEW 6.0) this will just mean that any new features/bug fixes would only be applied to LabVIEW 2010 and newer.

Link to comment

As a note for making inline VIs... I've been building plugins using objects in packed libraries. Object properties that are set to inline have thrown packed-library build errors. I don't believe I have any other VIs that have been set to inline when performing the builds.

Link to comment

I think it could make sense for OpenG to start moving to 2010, at least, for active development.  This won't negatively impact people using older versions of OpenG, it just means that they won't be able to install newer versions of OpenG into older versions of LabVIEW.  I think the benefits of moving forward outweigh the benefits of staying on older versions of LabVIEW.

 

Also, it might make sense to change the version of OpenG Libraries to 2010 for those built in 2010 and then create a 2009 branch if any improvements need to also added to the 2009 branch.

Link to comment
Thinking about a lot of my use cases though, very little of the OpenG stuff is called in tight/fast loops, so I wonder how much inlining would help. These days I tend to just let the compiler get on with its job and not worry too much about incremental performance gains.

I don't have a lot of tight/fast loops running using OpenG code but I do call OpenG code quite often (Arrays, File I/O, Application Control, LabVIEW Data, String, Time), and inlineing a VI is a quick and simple way to get some extra performance (little or not).  It's not a magic bullet by any means but I made a point when working on our internal reuse library to inline VIs that can be inlined.  There was also a tool NI made for 2012 that measured performance and detected when VIs may benefit from an inlineing operation.

Link to comment
If the VI is not being called often is there any point in inlining?

If a VI is being called once, it can benefit from inlineing (assuming it can be inlined and be made reentrant without a functional change)

 

I know in other languages you can force functions to be inlined but I thought it was generally considered to not be a good choice for a human to make most of the time, I think the compiler has far better judgement on which things should be inlined etc.

Maybe that's why I am inlineing so much, I am not familiar with what inlining means in other languages.  Is it just taking text files and basically inserting them into one big file?  If you had 3000 text files (like 3000 vis) would a text based language have a difficulty time using it?

 

 

 

EDIT: The link I posted to earlier mentions this.

Inlining subVIs is most useful for small subVIs, subVIs within a loop, subVIs with unwired outputs, or subVIs you call only once. 

Many OpenG VIs are small subVIs, that could be called within a loop, likely has unwired outputs, and you may call it once.

Edited by hooovahh
Link to comment
  • 8 months later...

Found a bug, Current VIs Parents Ref__ogtk.vi, and Current VIs Reference__ogtk.vi should not be inlined.  They are index 5 and 6 on the VIs to Modify array and to fix it just turn off Inline for these VIs.  They can still be Shared Reentrant.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.