kc1...@ya... wrote:
>Hi list,
>
>I have a need to set up a selection list and I am
>using a simple statement like:
>
>self.components.cbxMyComboBox.items=items
>
>where items is a list of selection items.
>
>The problem is that when the size of items gets to be
>very large (like 10000), it takes *forever* to run.
>However, a non-pythoncard type assign takes no time at
>all (like abc_list = items).
>
>I am assuming that Pythoncard needs to actually *copy*
>the list whereas the simple assignment is only an
>address assignment (alas pointer).
>
>Is there anyway to improve the performance?
>
>
I don't think so. As far as I can see, PythonCard simply calls the
wxPython function AppendItems, which in turn simply calls the wxWidgets
(i.e. c++) function of the same name - so unless I'm misreading it,
there's nothing obvious to be done.
Obligatory annoying question : is a UI with 10000 items in a ComboBox
really usable ?
Only slightly less annoying question : could you use a List instead of a
ComboBox ?
(10000 elements in a list takes < 1 sec on my slow laptop)
--
Alex Tweedly http://www.tweedly.net
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.7/379 - Release Date: 29/06/2006
|