I hope this question is SO worthy, but I'll give it a try...
I have a rather complex GUI and am looking to increase the overall performance a bit. I stumbled upon some comboboxes that are populated with a lot of entries (up to 10000 lines). The creation of all swing elements is already optimized, so they are normally initialized only once. But it seems kinda memory intensive to have, let's say, 10 combobox models with 10k entries always in the background.
I have implemented a search feature, so the user can type 'B' and the list jumps to the first entry starting with 'B' (and further refining if more chars are added). But this does not alter the model, just reset the selected index, so the list still contains all entries.
My question is:
Are there any best practices on how to handle a lot of entries within a combobox? And from the user's view, would you rather display all entries, or just the first 100 and others on demand after a key was pressed?
Or to ask a more specific question:
Is it better to keep a big comboboxmodel in memory, or to create a small one (with ~100 entries) every time the user enters a new key?
Thanks for input and suggestions!