QControl Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

A Question about Wizard Load Times

All,

 

I'm finally getting to all of the fixes I promised including: fixing the memory leak, removing the broken file that is not needed, and removing third-party dependencies.

 

One of the things I have been working to improve is the load time of the Wizard.  One thing I could fix could be fixed in a couple of ways and would like some feedback.  The tree control that lets you choose which class to inherit from loads dynamically from the QControl classes in [LabVIEW]\vi.lib\QSI\QControls\QControl Classes.  I did this so you could keep your QControls there and then they would show up in the wizard too.  By doing this it takes a second or so for that part alone.

 

So, to speed things up, I could one of two things:

  1. Make the tree static - It would not show your QControls in the directory but would load faster.  It would only show the QControls it ships with.  You can still select a path to inherit from your own QControls (feature that is already available).
  2. Lazy load the tree - I would let the Wizard open while still populating the tree.  This would only be visible if you clicked next before it was done but most likely it would be done before you got there.  If you did happen to see the tree control, it would just show "Loading..." until it was done.

What do you think?

Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 1 of 3
(3,319 Views)

I'm hardly a pro at this, but I like option 1 better. I tend to keep my custom controls in the project directory to make it a little easier on SCC to keep everything together. That said, I don't have any super-flexible QControls that I need to inherit from, so if you DO inherit from non-base Qcontrols frequently it could be nicer to have them in the list. Option 2 does seem like more work to implement but for my personal use-case I don't think it would be too helpful.

 

Maybe an Option 3 would be to have the Load from Path auto-populate to the QSI/QControls/QControl Classes directory? It would be like, 2 more clicks to get to your general-purpose QControls than having them in the tree.

0 Kudos
Message 2 of 3
(3,281 Views)

After some back and forth emails with Darren and some more investigation there are three things that are affecting the load time of the wizard, one of which is out of my control. They are:

 

1. LabVIEW IDE calling of a Wizard

2. Time to load classes that are used into memory 

3. Time to lookup QControl Class Hierarchy and load into the tree

 

Number 1 is out of my control but seem to be only a small portion of the time (<0.5 sec).

 

I have been able to improve times based off of #2 by reducing the number of classes loaded. I removed dependencies on the Icon API from the Wizard and only use it in the actual creation script. I then separated the Wizard from the creation script. Now the only classes loaded are the Wizard itself, the QControl Info class (that separates the Wizard from the creation script, and the QControl used in the Wizard. This reduced the load time by about 2 seconds on my system. (From 6 seconds to about 4 seconds). 

 

For #3, I looked into caching the contents of the QControl folder and doing some sort of quicker check to see if it had changed. I still might do this but first I implemented an asynchronous load of the tree. Therefore, it allows the Wizard to open while the QControl class folder is still being read and tree control loaded. If the user clicks Next quickly then they will see a loading message. Most of the time I was not able to click next fast enough to see the loading message. This cut off another 1.5 seconds off the load by shifting the load “location”.  I still might implement the caching option but this already make the user experience better. 

 

As of now I have the load only takes about 2 to 2.5 seconds.

Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 3 of 3
(3,265 Views)