07-17-2009 06:43 AM - edited 07-17-2009 06:44 AM
07-17-2009 07:53 AM
07-17-2009 08:18 AM
07-17-2009 08:55 AM
On my computer, the modified version of the VI, with 1000 created lines (rather then 100), is taking about 1 second.
The unmodified version takes about 8 to 10 seconds.
07-17-2009 09:07 AM - edited 07-17-2009 09:07 AM
09-20-2009 01:40 PM
09-20-2009 02:04 PM
09-21-2009 06:27 AM
Hi Ceties,
Matthew is 100% right.
If you "calculate" formatting in memory, and you will update everythink at once, you can incredibly increase performance. While with your code, it took me about 53 seconds to "delete" everythink, with little modification time necessary to perform this operation dropped downd to about 100ms!
To be trully honest, I didn't test this program completely, bu I hope it has the same functionality as the one you provided 😉
Regards,
Martin
09-21-2009 11:17 AM - edited 09-21-2009 11:19 AM
Thank you both. I followed your advice. The previous example assumed that the whole row has the same formating. I altered the code to respect different formating for each cell. Even with defering panel updates I am not able to get better results than 1sec on my machine- ERASING ONE ROW.
The last I can think of is keeping the formating in memory the whole time which I don't wanna do since I update the Listbox from different loops. Maybe Action engine might work for that but before I wante to ask if there is still some space fore the code improvement.
Thanks
09-22-2009 03:23 AM
Hi Ceties,
You are right that deffering front panel in this case doesn't help so much. This is because Multiconumn Listbox doesn't use Synchronous Display by default. If you set to use synchronous display, and you wouldn't deffer front panel updates, your performance would be significantly wors.
With attached example, to erase one row, when I set different formatting for each cell, it takes about 0.6s on my computer to finish. With Synchronous Display it takes more than 6s !, so you could see great difference. Moreover,as you can see, I read all the time actual formatting. this reading takes about 0.20s itself. If you avoid reading it all the time, and instead you will keep it in memory, you can save somethink like 30% of the time!
In case you need to update each cell font separately, you need to update a lot of cells. In our case it is about 2000 property node calls. Positive think is, that more cells you delete, faster theoperation is 😄
Anyway, I belive that it is not very important to keep all the data in the table. If the performance is of the question, I would keep all data in memory in shift registers for example, and I would all the time display just reasonable amount of data in listbox. You can implement scrolling by your self, and thus you could keep just couple of hundred rows displayed.However, this would give another challange to update all the time formatting as you scroll 🙂
At
the last, I believe that with good architecture it should not be
problem to update those data in table from different locations. It can
just take some more time to develop your code
Use just useful advices 🙂
Martin