After creating a custom new item form for a SharePoint list having a very large number of items, the new item form will take a very long time to load at browse time. There are no error messages.
The issue happens because the default value “0” of the ListItemID parameter of the data source in the new item form causes a very resource intensive query to be run at page load time. This causes the perfiormance issue during page load. The reason we include all those parameters is to make the datasourcecontrol extensible in design time. The datasourcecontrol can be used by another webpart or view on the page and it could still work. If you don’t need those scenarios, then removing them should still work in runtime.
- Using the “Common Data View Tasks” pane for the new item form, click on “Parameters” to open the “Data View Parameters” dialog box.
- Select ListItemID and delete “0” in the Default Value input box.
- Leave the default value of ListItemID blank and click on OK.
- Save the page, and browse to it.
Additional Advice / Tip:
When working with large data sets you may experience other slowness in SharePoint Designer while working with data views. In those situations, you may see SharePoint Designer as non-responsive for several seconds after changes are made and / or may seem very sluggish once it’s responding. Quick fix is to click “Common Data View Tasks” pane for the data view, and select “Show with sample data”. Instead of showing all of the data from the data source, it limits it to 5 sample items.