Reputation: 91
I need to display "too many" (like 20k) entries in a JFace ComboViewer. Measurement shows, that populating the combo takes multiple seconds, and depending on the UI I have several such combos on the screen - so opening some panels takes > 10 sec. Data to be set are already cached. So it is really not about DB-Loading performance, but just about populating ComboViewer (doesnt matter if I use Combo or CCombo underneath).
I thought about the following, but no solution really seems to work for me.
I have no obvious other ideas. Did anyone else run into a similar situation, and maybe found a solution to solve it?
I'd love to find a control with a datamodel like e.g. NatTable underneath, which handles "big amounts of data" very well. ComboViewer seems to be the wrong control for such kind of data, but replacing it in an old legacy application again causes quite some work.
Thanks, Chris
Upvotes: 0
Views: 30
Reputation: 91
I finally solved the problem like this:
This way loading "one big set of values" doesn't block the UI thread for multiple seconds; the UI remains useable.
Care has to be taken when setting the currently selected item - this has to be postboned until the loading thread is finished.
I would have preferred to use a concept like SWT.Virtual. Unfortunately the API isn't perfectly consistent between controls.
Upvotes: 0