Internet Explorer lags behind IQueryable datasource. Firefox and Chrome A-OK. Video support

I would like to say this request, but it is not. Even when we go through it step by step, requests end without a hitch. Even the .DataBind () method does not call APPEAR to cause a delay.

Here, as I know, this is related to my IQueryable as a binding source:

Old code:

  • Call the stored procedure using SqlCommand and use the SqlAdapter to populate the new DataTable.
  • A DataTable will be sent to the method for each DropDownList. (There are 5 DDL)
  • Each method will feed the rows of the DataTable (yes, each of them) in IEnumerable.
  • Several LINQ queries will run against IEnumerable to filter out the parameters we need, including .Distinct (IEqualityComparer) and .Sort (x => x ["RowName"]); (Again, each of the methods would do this).
  • A new DataTable will be created via IEnumerable.CopyToDataTable () (Yes, again, every method)
  • A new DataTable will be installed in DropDownList.DataSource and then .DataBind ().

This horrible parody of code will end very quickly in IE. Perhaps for a second or two time to think.

Here's the new code, according to the flesh:

IQueryable<Expose_LotRuns> elr = DB.Expose_LotRuns;

if (iTechID > 0)
    elr = elr.Where(x => x.Master_LotRuns.Flows.CD_Techs.ID == iTechID);

if (iFlowID > 0)
    elr = elr.Where(x => x.Master_LotRuns.Flows.ID == iFlowID);

if (iToolID > 0)
    elr = elr.Where(x => x.Master_LotRuns.Tools.ID == iToolID);

if (iOperationID > 0)
    elr = elr.Where(x => x.Master_LotRuns.Operations.ID == iOperationID);

if (iReticleID > 0)
    elr = elr.Where(x => x.Reticles.ID == iReticleID);

var techs = from x in elr
                        where (x.Master_LotRuns.Flows.CD_Techs != null)
                        group x by new
                        {
                            x.Master_LotRuns.Flows.CD_Techs.ID,
                            x.Master_LotRuns.Flows.CD_Techs.Technology
                        } into y
                        orderby y.Key.Technology
                        select new { y.Key.ID, y.Key.Technology };

var flows = from x in elr
                        //where (x.Master_LotRuns.Flows != null)
                        group x by new
                        {
                            x.Master_LotRuns.Flows.ID,
                            x.Master_LotRuns.Flows.Flow
                        } into y
                        orderby y.Key.Flow
                        select new { y.Key.ID, y.Key.Flow };

var tools = from x in elr
                        //where (x.Master_LotRuns.Tools != null)
                        group x by new
                        {
                            x.Master_LotRuns.Tools.ID,
                            x.Master_LotRuns.Tools.Tool
                        } into y
                        orderby y.Key.Tool
                        select new { y.Key.ID, y.Key.Tool };

var ops = from x in elr
                    //where (x.Master_LotRuns.Operations != null)
                    group x by new
                    {
                        x.Master_LotRuns.Operations.ID,
                        x.Master_LotRuns.Operations.Operation
                    } into y
                    orderby y.Key.Operation
                    select new { y.Key.ID, y.Key.Operation };

var rets = from x in elr
                     //where (x.Reticles != null)
                     group x by new { x.Reticles.ID, x.Reticles.Reticle } into y
                     orderby y.Key.Reticle
                     select new { y.Key.ID, y.Key.Reticle };

ddlTechs.DataTextField = "Technology";
ddlTechs.DataValueField = "ID";
ddlTechs.DataSource = techs;
ddlTechs.DataBind();
ddlTechs.Items.Insert(0, new ListItem("Any", "0"));

ddlFlows.DataTextField = "Flow";
ddlFlows.DataValueField = "ID";
ddlFlows.DataSource = flows;
ddlFlows.DataBind();
ddlFlows.Items.Insert(0, new ListItem("Any", "0"));

ddlTools.DataTextField = "Tool";
ddlTools.DataValueField = "ID";
ddlTools.DataSource = tools;
ddlTools.DataBind();
ddlTools.Items.Insert(0, new ListItem("Any", "0"));

ddlOpers.DataTextField = "Operation";
ddlOpers.DataValueField = "ID";
ddlOpers.DataSource = ops;
ddlOpers.DataBind();
ddlOpers.Items.Insert(0, new ListItem("Any", "0"));

ddlReticles.DataTextField = "Reticle";
ddlReticles.DataValueField = "ID";
ddlReticles.DataSource = rets;
ddlReticles.DataBind();
ddlReticles.Items.Insert(0, new ListItem("Any", "0"));

, , , Firefox, Chrome, MS IE. , IE, IE - . , DDL, . , ( , , ) .

http://www.youtube.com/watch?v=-3QyNj87BSQ

, , , , IE , , . BTW, IE7 IE8

+3
2

-, , , IE. ASP.NET UpdatePanel, IE, . . this.

, Profiler ( IE8 ) , . , HTTPWatch Fiddler, , . , .

+5

Source: https://habr.com/ru/post/1728951/


All Articles