Re[2]: [PHP-GTK] infinite loop problem :(
| From: | £ukasz Wojciechowski | Date: | Sat, 14 May 2005 19:21:21 +0000 |
| Subject: | Re[2]: [PHP-GTK] infinite loop problem :( | ||
| References: | 1 2 3 4 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5856@lists.php.net to get a copy of this message | ||
> Certainly fetching 2000 items to put them in a CList is going to be slow.
> But changing the list out from under the user every time they scroll is
> going to be *WORSE*.
> Sure, you can fill it fast the first time, but you pay the penalty of
> re-filling it every time they click, and that's going to be really worse.
> What you might consider is:
> Send the query to get all 2000 rows, and fill in the number of rows
> visible, and display the CList with only that many rows filled in so far.
> Then, set up a timer/loop to fill in the rest of the rows, over time, as
> the user sits there looking at the first N rows, you are filling in the
> rest.
> Even as they scroll or whatever, your loop/timer should be filling in more
> and more rows in the CList until all 2000 are in there.
> This gives the user the ability to see the early rows, and scroll down
> while the rest fill in.
> Another consideration is this: Is the user likely to know some letters in
> the item[s] they are looking for in these 2000? Perhaps a CList of all
> 2000 is just not the right interface.
> Maybe they should have an alphabet across the top for the first character,
> and then the CList would change based on the first letter they click on.
> Or maybe they could type a few letters from anywhere in the name/string of
> what they are looking for, and you present a CList of the matching items.
> Very few people want to sit there and scroll through 1247 items to get to
> the one they want.
> --
> Like Music?
> http://l-i-e.com/artists.htm
Your suggestions seems to be very nice - thanks for your time.
Application that Im building is on of my first serious php-gtk oop app
:) - Im still learning so I decided to let this Clist be filled "my
way" - at least in first version, but I will use Your suggestions for
sure in the future.
Thanks again
--
Greetings
£ukasz Wojciechowski