If you are not satisfied with the time of add or load data into some controls there is a nice way to speed it up to 5-7 times. For example when you add 1 000 000 rows to Listbox control you must wait over 10 seconds to finish. We can make this in 2-3 seconds…
The solution for increasing the speed of some actions made in REALbasic controls is practically easy. We will use our Listbox Control example. REALbasic redraws the Listbox each time we AddRow to our control. To make it 5-7 times faster we must hide it for the time of using loop for i = 1 to 1000000. And this works!
1 2 3 4 5 6 7 8 | Dim i As Integer Listbox1.Visible = false for i = 1 to 1000000 Listbox1.AddRow Str(i) next Listbox1.Visible = true |
Excellent tip! AND an Excellent Site.
It has renewed my interest in RB.
Nice to hear that Stave
Great tip. I just started following your site since I found you via Twitter. Keep up the great work!!
Thank you Scott for good word!
Fantastic tip. I had never thought to do this.
Thanks!
You welcome Andrew
Excellent tip Jakub! Keep rocking!
Thanks for the great tip! I’m trying to get around the listbox not being transparent by drawing the appropriate portion of the window background into each cell. It was taking a bit to load and slamming the CPU.
This trick makes it load instantly and CPU usage dropped by 90%!