Re: MacOS Tahoe painfully slow a wxChoice containing 6k entries.

Tony Kennedy <[email protected]> Thu, 11 Dec 2025 00:08:11 -0800 (PST)
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
I agree, there are too many entries. The correct way in the app is to array 
the entries in the choice control (so one entry can have thousands of 
sub-entries). But a user has copied/pasted instead resulting in the large 
number of entries. I'm sure we all ask ourselves the same question "why 
have they done this?" all the time.

I'm back up and running now with a wrapper class 
around wxOwnerDrawnComboBox. I'll share it once I've had some feedback 
regarding testing.

I also tried wxWindowUpdateLocker (I use that all the time), it didn't make 
a difference.

All the best,

Tony.



On Thursday, 11 December 2025 at 02:09:59 UTC Vadim Zeitlin wrote:

> On Wed, 10 Dec 2025 01:31:15 -0800 (PST) Tony Kennedy wrote:
>
> TK> The wxChoice control has 6500 entries and takes approximately a minute 
> to 
> TK> clear all entries.
>
> Recommended maximum number of elements for simple controls like wxChoice,
> wxComboBox, wxListBox etc is a hundred entries, a couple of hundreds at
> most. How can a user possibly select anything in a control with several
> thousands of them?
>
> TK> Any advice would be very welcome.
>
> My first advice is to not use wxChoice for this. Maybe you could create
> wxWindowUpdateLocker for it before clearing it (and maybe this could be
> done by Clear() itself) and perhaps something else could be optimized in
> its implementation (it might be deleting items one by one currently instead
> of removing them all at once) but it was never supposed to be used with
> such numbers of items anyhow.
>
> Regards,
> VZ
>
> -- 
> TT-Solutions: wxWidgets consultancy and technical support
> https://www.tt-solutions.com/
>

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/wx-users/4aee5ac1-849b-4868-b725-8af7671eb603n%40googlegroups.com.