The Microsoft.SharePoint.WebControls.LookupField control is used as the default control when editing a lookup field value. When the list that is referenced by the lookup field contains hundreds or thousands of items – it takes this control a while to gather all items that will be displayed – slowing down the page performance when requesting the edit page of your list item.Following illustration shows a standard list and how you would start editing an item:
The upcoming standard Edit Form will use a LookupField control to display the current lookup value and the possible values taken from the referenced table.
Performance problem of LookupField control
It makes sense that the page rendering takes longer the more items there are in the referenced list. I was however surprised to find the page performance to be very slow when pressing the OK button on the edit page after you have made changes to your edited list item. I thought that this should be a rather quick operating – doing a simple update and then returning to my SharePoint list.
It turned out that submitting my changes took as long as requesting the edit form page. Looking insight into whats going on revealed the reason for that. It seems that the LookupField control also retrievs all items in case of a Page Postback – which happens when clicking the OK button. This might be intentional due to input value validation but it definitely slows down your page performance. The following PurePath shows what happens at the Page Postback:
In my example above I had 1000 items in the referenced list – causing a page rendering and postback time of almost 10 seconds where 7 seconds where spent by the LookupField control.
I am not sure if this behavior is intentional. In any case you may want to think about using an alternativ control in case your lookup list contains a large number of items.