LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
JesseU

Plots should have anti-alias off by default, for huge cpu savings

Status: New

I came to discover that the new silver plots such as the silver graph in LabVIEW 2011 have anti-alias on by default.  I find this very unfortunate, since the new silver stuff is in all likelihood what most people are going to use (first choice and looks cool), yet the silver plots are used at the risk of creating immensely inefficient programs, even if the code structure is efficient.  This is of course not a good thing, especially under particular circumstances, such as multiple programs being run at once, more time critical tasks involved, slower machine used, plot area expanded, etc.  And most people are never going to realize what's going on (it was pretty much by accident that I did).    

 

Let's not go backwards people!

7 Comments
PaulG.
Active Participant

I would rather have just the data points by default then I can select my own line formatting.

PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
SimonH
NI Employee (retired)

JesseU,

 

To give this idea a little background...

 

We debated this internally before we finalized the controls but ultimately I decided to leave anti-aliasing on by default for the first plot. My main reason being that we created the silver controls in response to requests for nicer looking, more modern UI elements. The smooth lines you get from anti-aliasing are part of that nicer, modern look.

 

Many people don't know about the option to enable/disable anti-aliasing so for these controls I wanted to expose the anti-aliasing and hope that if the performance was not what they needed they would discover the setting while looking for improvements (as you did). The other approach would of course be to leave it turned off and then fewer people benefit from the nice smooth lines.

 

If you really stress the UI you will notice that the silver controls are more resource intensive than the older controls (even beyond anti-aliasing on the graphs, although this will be the most pronounced). Drawing drop shadows, gradients, and anti-aliased lines simply take more CPU time than drawing simple shapes. However for most users we believe the performance is still good and they will be happy with the (hopefully unnoticeable) tradeoff of performance for "prettiness".

 

Anyone who wishes we'd done otherwise - you can edit the Silver controls in vi.lib\silver_ctls, so you can turn of the anti-aliasing for newly-placed graphs. If this idea gets enough votes we'll make the change for you in a future release.

 

Thanks for the feedback, we'll see how other people feel before making any changes since I suspect this is one decision that could go either way.

 

Simon Hogg

LabVIEW Product Manager

JesseU
Member

Thanks for responding Simon.  Yeah that's quite a conundrum, since an anti-aliased plot does just look so pretty and pleasant!  However, as I mentioned on a forum post here:

 

http://forums.ni.com/t5/LabVIEW/silver-graph-performance-apparent-serious-2011-flaw/m-p/1705980/high...

 

the performance cost is just so significant, that I think this will ultimately really hurt the effectiveness and reputation of Labview in multiple fields, since it's quite difficult to discover, after realizing the unusually high cpu usage, what the cause is (unless there was some kind of notice, which I suppose would be unsightly).  

 

My belief is that Labview already stands head and shoulder's above other development methods, and one reason for that is the ease of graphing and interacting with data, often in real time.  There's really nothing to improve in that aspect, in spite of silly requests for cosmetic changes.  In an effort to expand relevance, you guys should be looking elsewhere.  

 

Good luck,

Jesse 

vikramps65
Member

Thanks for this post. It took me some considerable time to figure this out myself. I, however, didnt realize it was the anti-aliasing feature that was slowing down my output. I just thought it had something to do with silver graphs and replcaed them with the modern graphs and the problem got solved. However, interestingly enough, I figured that even though the anti-aliasing was on for the silver graphs if I just minimized the vi while the code was running then there was no loss of time. Can anyone explain me why this slow down happens only when I see the graphs and not when I dont? 

 

Thanks.

RavensFan
Knight of NI

The OS is smart enough to know it doesn't need to bother calculating the anit-aliasing and what to show, when it knows it is not going to show the graph.

vikramps65
Member

Hi, Thanks for your answer but I am not totally convinced.

 

I am setting the option of anti-aliasing on the graph which is on the VI of labview. So this task is being executed under the labview process and has nothing to do with the OS detecting if the window is minimized?

RavensFan
Knight of NI

yes, the task is under the LabVIEW process.  But all process that involve drawing to the screen (LabVIEW, e-mail, MS Office, Explorer windows, Internet Explorer windows, ...)  all fall under the Windows process that determines what needs to be drawn on the screen.