I have collection of object,which contains 6-7 properties.Collection having over 30,000 records.If i go by giving collection to the datasource of combobox,then it will tell lot of time,as it will represent it as a grid.then i have to hide some column and ...inshort this process will take lot of time.Instead of this i want to add 30,000 records manually,by adding combobox.item.add(key,value),or something like that.
I read in the forum,there you cannot add items manually,you must have to give datasource.
Can you suggest me anything(like dictionary etc...) that will take less time to process?
Thanks,
Jay Parikh.
Hi Jay,
I doubt that copying the data from a Collection into some other structure will save you any time. In fact, it will probably just take longer because you not only have the binding time, but you are adding the time it will take to copy the data.
Binding a ComboBox to 30,000 items shouldn't really take that long. Have you explored why it's taking so long?
In any case, it's not really a good idea, because no user I have ever known will be able to deal with a list of 30,000 items. Scrolling through such a huge list wouldn't be very useful to anyone. Perhaps what you need to do is implement some kind of filtering mechanish where the list only contains a certain sub-set of the data at any one time. Perhaps you cold give the user a choice of categories and then populate the list based on the category they chose. I don't know your application or the data you are dealing with, so I don't know if that will work, of course.
Hi Mike,
It is not taking time to bind the data.It is taking time to display those data,as it will prepare grid for 30,000 rows with 6-7 columns.I have check that if i am binding 1000 records then its coming very quickly.So,its all about records(i mean Grid).May be i can use another control which supports adding items manually?not sure.
The scenario you told me to divide it in category or something is not possible in my application.
Thanks for the reply.
I will check further,what can be the solution.
jaysparikh said:It is not taking time to bind the data.It is taking time to display those data,as it will prepare grid for 30,000 rows with 6-7 columns.I have check that if i am binding 1000 records then its coming very quickly.So,its all about records(i mean Grid).May be i can use another control which supports adding items manually?not sure.
I don't understand what this means. You mean it takes time the first time you drop down the list? How exactly are you making the distinction between binding and displaying?
If it's a question of the Combo processing the data, the only thing I can think of that might cause a delay like this is the DropDownSearchMethod property. By default, the Combo does binary searching. But this means that it has to build a sorted list of the DisplayMemmer column values. So try switching this property to linear. This will slow down searching the list, but it will improve the initial load time of the control, so it's a trade-off.
Sorry for my English. I use Infragistics and Entity Framework in my WinForm c# project. I have a performance problem about binding data to UltraCombo and WinGrid via DataSource property.
Here is the part the source code in question :
List<RefStatutPersonne> elems = this.Entities.RefStatutPersonnes.ToList(); _ultraCombo_StatutPersonnes.DataSource = elems; _ultraCombo _StatutPersonnes.DisplayMember = "Nom"; _ultraCombo _StatutPersonnes.ValueMember = "ID";
To retrieve data is fast but the slowness occurs when I assign the elems variable to DataSource property. The elems variable has only 13 records and the binding time is very slow.
Have you idea?
Do it exists performance consideration to apply to binding data to Infragistics with Entity Framework?
I work with Visual Studio 2010 and NetAvantage 10.1 CLR2x.
Thank you
Stéphane
Hi Stéphane,
I can't see any reason why this should be slow, unless maybe your data source has a recursive data structure.
The first thing I recommend is that you take a look a the WinGrid Performance Guide. In particular, check out section 4 on Recursion.
aralmo said:I am having the same problem with 3 elements in the list, and no its not a recursive list.And no i dont have a DropDownSearchMode property or anything like this...
What problem are you having, exactly? Are you saying that adding 3 items to the list is taking a long time? If that's the case, then my best guess would be that something you are doing is causing Exceptions that are being caught and handled.
Can you duplicate this in a small sample project and post it here?
I am having the same problem with 3 elements in the list, and no its not a recursive list.And no i dont have a DropDownSearchMode property or anything like this...