|
|
|
As we've described, initial and subsequent page load speed for an ASP.NET web application is dependant upon the number of records in the dataset bound to the controls on the page. The larger the number, the slower the web page. In this demo we compare our grid's page load performance with those of our competitors when loading 300,000 records.
The numbers do not lie - when exploiting the new capabilities of ASPxGridView along with our dataset providers, nothing can match the speed and memory footprint of the ASPxGridView.
Important Notes:
1) The initial load time for competing Grid products is approximately 10 seconds.
2) Row Expansion and Row Collapse by competing grid products are only performed against the current page.
3) Summary Computation and timings associated with it are misleading when viewing competing grid products because summaries are only computed against the current set of records on the page rather than the number of records contained within the 300,000 recordset.
|
|
|
|
Using
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DevExpress.Xpo; public partial class DataBinding_XPOLargeDB : BasePage {
protected void Page_Load(object sender, EventArgs e) {
if(IsSiteDemo) {
Session session = new Session();
XpoDataSource1.Session = session;
}
else {
Form.FindControl("lGeneralTerms").PreRender += new EventHandler(DataBinding_XPOLargeDB_PreRender);
Form.FindControl("tblSourceCode").Visible = false;
pSiteDemo.Visible = false;
}
}
protected string SectionParameter { get { return Page.Request.QueryString["Section"]; } }
protected void grid_SummaryDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewSummaryDisplayTextEventArgs e) {
if(e.Item.FieldName == "Size") {
e.Text = GetSizeDisplayText(e.Value);
}
}
protected void grid_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e) {
if(object.Equals(e.Column, grid.Columns["Size"]))
e.DisplayText = GetSizeDisplayText(e.Value);
}
string GetSizeDisplayText(object value) {
long size = value != null ? Convert.ToInt64(value) : 0;
int oneK = 1024;
int oneM = oneK * oneK;
int oneG = oneM * oneK;
if(size > oneG) {
long gig = size / oneG;
long meg = (size - oneG * gig) / oneM;
return string.Format("{0}, {1} M", gig, meg);
}
if(size > oneM) {
return string.Format("{0} M", size / oneM);
} else {
return string.Format("{0} K", size / oneK);
}
}
void DataBinding_XPOLargeDB_PreRender(object sender, EventArgs e) {
((System.Web.UI.WebControls.Literal)sender).Text = "";
}
protected bool IsSiteDemo {
get { return DemoSettings.IsSiteMode; }
}
}
|
 |
|
|
|
|