From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Managing VIREO loading

Hello to all,

I'm currently working on an application using WebVI as an UI.  My UI have several pages, each corresponding to a function set ( main, confiugration,users... etc).

The problem is, each time I'm loading a page, VIREO have to load and interpret the page, which can be very long and interfere with the smooth UI experience I'd like to give.

My question is how to manage more efficiently VIREO, like, is it possible to keep it in cache or something ? Or to keep the wholes pages in cache ? 

I tried the alternative of loading all my codes in several iframe, but vireo is loaded x times and is significantly slower and I deemed the solution unacceptable. Perhpas it would work if I was able to load it only one time in the "main" page and access to this instance from the subpanel but from what I've seen it seems impossible.

So my question is : how to accelerate the loading and unloading of webpages using vireo ?

0 Kudos
Message 1 of 10
(3,055 Views)

Hi Joannick_DAM

 

The recommended way to share resources between multiple top-level WebVIs is to place them in a single component. The Multiple Top-Level WebVIs example on the https://github.com/ni/webvi-examples page demonstrates how to organize a Web Application Component with multiple top-level WebVIs. When the page is built the generated output will create one copy of the shared resources (including vireo.js) that the browsers will be able to cache efficiently.

 

The following gif shows how using the Multiple Top-Level VIs configuration and a server that is well-configured for serving files in a manner that can be cached can be verified in Chrome Developer Tools.

 

VireoCache.gif

 

Note that even with proper caching there is still time needed to run the cached scripts when a page is loaded. This is required each time a page is visited regardless of caching behavior.

 

The other alternative is that instead of creating multiple independent web applications that share resources, you can create a single web application that dynamically updates the single front panel. This can be achieved in NXG 2.1.1 using a tab control and treating each tab as an independent page. Unfortunately LabVIEW NXG 2.1.1 does not currently provide features that make this approach a first-class experience. It is not possible to hide the tab header from the editor without custom styles, we do not connect the tab transitions to the forward and back buttons of the browser, the url is not updated based on current tab selection, etc. In web development terms this kind of single page experience is referred to as a single-page application.


Milan
0 Kudos
Message 2 of 10
(2,983 Views)

What is vireo?

 

Seriously,   I have no idea why this question has anything to do with LabVIEW.....and, I cannot be that out of the loop.


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 10
(2,978 Views)

Haha Smiley Tongue. The Virtual Instrument Runtime Engine Object (backronym for Vireo) is an open source (non-OSI) compact LabVIEW runtime used by WebVIs in LabVIEW NXG: https://github.com/ni/VireoSDK.

 

We gave some good technical overviews of WebVIs at Embedded World 2018 which I have attached to this post. They give a bit more context about Vireo and how it is utilized in LabVIEW NXG WebVIs to execute block diagram logic.


Milan
Download All
0 Kudos
Message 4 of 10
(2,972 Views)

@MilanR wrote:

Haha Smiley Tongue. The Virtual Instrument Runtime Engine Object (backronym for Vireo) is an open source (non-OSI) compact LabVIEW runtime used by WebVIs in LabVIEW NXG: https://github.com/ni/VireoSDK.

 

We gave some good technical overviews of WebVIs at Embedded World 2018 which I have attached to this post. They give a bit more context about Vireo and how it is utilized in LabVIEW NXG WebVIs to execute block diagram logic.


Ok thanks... does the html page have a text search feature yet?

 

Sorry, but I need to edit my skill set to products that are useful....

 

I'd move this thread to a relevant board if there was an ni product board that people would use.  I doubt it belongs on LabVIEW.....  perhaps product features?  Maybe breakpoint? Where do you never answer these questions?


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 10
(2,959 Views)

In LabVIEW NXG 3 the HTML view of a WebVI does include the ability to search text using the Ctrl+f keyboard shortcut. I believe that feature made it into the current NXG Technical Preview as well.


Milan
0 Kudos
Message 6 of 10
(2,952 Views)

@MilanR wrote:

In LabVIEW NXG 3 the HTML view of a WebVI does include the ability to search text using the Ctrl+f keyboard shortcut. I believe that feature made it into the current NXG Technical Preview as well.


You are welcome.    And no,  text search of the html page was not available in May....I did get some ni people to commit to make it  happen. 

 

 

Funny.  Auto correction wants to make 

Commit resources  Vomit suicide


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 10
(2,946 Views)

Thank you for your answer, I did not think it was already managed at the component level. My WebVIs are aldready all contained in the same component, so I guess I can't do much more. The thing is my WebApp is supposed to run on a tablet with a good-but-not-that-good hardware. I've already tried the "multiple tab" approach, I can swap between them with some workaround and Hide the header too, but It's just too much code, and the UI get inacceptably slow. So it's either "slow loading" or "slow everything else". I'm kind of out of idea 😕

0 Kudos
Message 8 of 10
(2,887 Views)

text search of the html page was not available in May....I did get some ni people to commit to make it happen. 

Yes Ctrl+F support was added in the latest LabVIEW NXG 3.0 Beta drop, in response to feedback we got at NIWeek in May. You should be able to use it at: ni.com/techpreview  

 

- one of those people who committed to making that happen 🙂

Darin Gillis
NI - Chief Product Owner - VeriStand
Message 9 of 10
(2,869 Views)

Hello, I'm coming back with other questions regarding this subject but a diffrent method.

I'm loading multiple instances of vireo in several tabs in one webpage by using iframes.

When everything is loaded, I experience a significant slow down of the Webvi. It's probably because running multiple instance of vireo ( six in my case) is a heavy load for the cpu. So my question is : is there a way to "freeze" vireo ? For example by blocking the access to "vireo.js" ? I think it would solve my problem but since I don't know Javascript so much, I don't know how this could be achievable...

 

Thank you in advance !

0 Kudos
Message 10 of 10
(2,824 Views)