Hello Fernando, thank you for your inputs.
Please let me clarify..(I edited this posting to make it more to the point)
With this thread I just want to suggest to create one additional QForm element QListBoxArray that is very performant by using Arrays.
This QForm would then be a great usecase of a performant implementation using arrays and could easily be adjusted for different additional uses (eg by combining with some JQuery plugins that also just need very fast some array values in JSON Format or something..... Example are JS datagrids or trees).
So the usefulness is not only about a QListbox replacement here..
Rather having a best practice way to make performant QForm Controls and there a QListBox really is often needed.
Mike has already made a fantastic tool with the autocompleteTextbox which is very useful for larger count entries. Thanks for that it is great.
However tackling directly the QListBox would also be awesome.
Other ORMs like Doctrine and Propel offer this possibility and they are widely used. The performance difference is of course depending on your application but benchmarks in these ORMs showed amazing 'up to 60 times faster' improvements.
Here is also a relatively concrete Example:
If you have:
- 10 Listboxes
- with each 40 entries on one form
-> I generate 400 Objects from the model
-> and also additional Qquery and Qform objects etc..
...at least xxxx Objectinstances are flowing around in the memory.
But we are still only talking about 10 Listboxes, that is not like a bloated UI or something.
Yet some of these Listboxes might come from different very populated tables in terms of many columns (Person 70 Columns, Item 80 Columns, etc.) with foreignkeys and that makes the whole thing more costly.
The option to cut down a few of these by using arrays would really cut down a lot of performance cost.
That same example with datagrid is probably even worse on the clientside because of all the UI elements, additional clicks and large JS footprint in the HTML delivered.
--
Hope this makes a little clear where I'm coming from.
Regarding the QListBoxArray - It would not blow up the framework nor make anything obsolete we have achieved - just a nice performant addition that is supported right out of the box (and therefore no individual hacking required for people wanting to use arrays)
Regards,
tronics