Click here to Skip to main content
16,016,623 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,


i have 100 recorders in the grid-view it will take 25 sec coming in the gridview
i want to reduces the 25 sec to 7 sec.

i want to time must be reduce to 25 sec to 7 sec when page is loading 100 recorders
how can i do this?

VB
what are setting in the web config and what can i do for css,javascripts all files to take less
time to load when i upload in the production server








Regrads
Sadhana.R.Belge
Posted
Comments
F-ES Sitecore 26-Aug-15 4:02am    
You need to find out what is taking the time. Is your SP taking a long time to return the data? Or is the data coming back quick but it is the gridview taking the time to render? You can use the Stopwatch class to time sections of your code to see where the bottle-neck is. You have to know exactly what is taking a long time in order to know what needs improving.

Also there is no setting that takes things less time to download. If you want to improve the efficiency of your css files etc the process is called minification and bundling. How you do this depends on if you're using webforms or mvc, but google for it and you'll find solutions.

1 solution

WHAT CODE YOU ARE USING IN PAGELOAD ?
 
Share this answer
 
Comments
sadhana4 26-Aug-15 3:16am    
try
{
SqlCommand cmd = new SqlCommand();
cmd.CommandText = SPName;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection = this.Connection;
cmd.CommandTimeout = 120;


if (fieldNames != null)
{
for (int i = 0; i < fieldNames.Length; i++)
{
if (fieldNames[i] != null)
{
if (values[i] == "")
cmd.Parameters.Add(new SqlParameter(fieldNames[i], DBNull.Value));
else
cmd.Parameters.Add(new SqlParameter(fieldNames[i], values[i].Trim()));
}
}
}
cmd.ExecuteNonQuery();
DataSet othersDataSet = new DataSet("others");

SqlDataAdapter othersDataAdaptor = new SqlDataAdapter(cmd);

othersDataAdaptor.Fill(othersDataSet);
this.Records = othersDataSet;

return true;
}
catch (Exception ex)
{
Log.WriteLog("TickerCollection.cs", "GetDataSetForothersEXECUTESP(string[] fieldNames, string[] values,string SPNAME)", ex.Source, ex.Message);
return false;
}
finally
{

}
RISKYROCKS 26-Aug-15 3:29am    
1 .FIRST U SHOULD TRY TO CREATE STORE PROCEDURE IN DATABASE AND THAN USE IT THERE
2. U CAN MAKE A WEB METHOD AND PUT THIS CODE INTO IT AND USE JQUERY.AJAX api.jquery.com/jquery.ajax/ IN CLIENT SIDE TO CALL THIS

3.USE LESS VALIDATION THERE
sadhana4 26-Aug-15 3:16am    
bind the gridview with this method
sadhana4 26-Aug-15 5:49am    
it is right CommandTimeout or should i change CommandTimeout
RISKYROCKS 27-Aug-15 1:55am    
YES IT IS RIGHT

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900