05-02-2008 07:43 AM
05-02-2008 02:49 PM
We fixed a bug in 8.5 that unintentionally introduced this performance issue. I am attaching a CVI 8.5.0 version of toolbox.c with a fix for this. This will be fixed in the next version of CVI. Basically, the change is in ListInsertItems.
Replace
if (!ListPreAllocate(list, numItemsToInsert))
return FALSE;
with
if ((*list)->numItems + numItemsToInsert >= (*list)->listSize)
if (!ExpandListSpace (list, -numItemsToInsert))
return FALSE;
NOTE: It is better to make the above change manually if your version of toolbox.c has other changes or if you have a different version of CVI. If you decide to use the attached toolbox.c file, I recommend that you first diff it with your file to make sure there are no other differences. Also, you should recompile toolbox.c using Options >> Create Object File menu item in the Source Editor window to propogate the fix to the installed toolbox.obj files.