Prometheus Getting Slower

8 posts, 0 answers
  1. Stuart
    Stuart avatar
    102 posts
    Member since:
    Jul 2012

    Posted 25 Apr 2008 Link to this post

    Hi to all, I have been building cms websites for now well over a year using your controls, prometheus was built on the concept of sleek, fast and responsive controls. One website in particular I have been keeping up to date with your controls and completely rewrote it at a stage to build it on the prometheus suite, initially the speed tests were very good and I saw a nice performance boost,

    At that time I was using the asp.net panelbar for nav and the rotator on 2 other pages that will be nested in a iframe in my page. then I used this up onto the Prometheus 2007 Q3 sp2 version then came the release of 2008 Q1 prometheus I built it in recoded the panelbar and what happened this added a 4+ second load time to my website.

    Then Coded the same site page back to 2007 Q3 sp2 and it was slightly faster, but then i found that the there is a very long time the browser waits before it transfers data.

    The I took that website, stripped all the prometheus stuff from the front end page used asp.net ajax, and panelbar remove the telerik script manager and took out the Telerik.web.ui.webresource.axd from the web.config file . My admin app for the site still uses the prometheus stuff witout a hitch but I found that the front application loads faster than ever, even though the document size is bigger.

    Here are the tests so you can see for yourself, clear your cache before each check.

    http://www.nwcf.com <- built on 2008 Q1 Prometheus
    http://speedup.nwcf.pcwnewmedia.co.za/default.aspx <- built on 2007 Q3 sp2 prometheus
    http://speedup.nwcf.pcwnewmedia.co.za/default2.aspx <-Built entirely on 2007 Q3 sp2 Controls for Asp.net
  2. Guy
    Guy avatar
    49 posts
    Member since:
    Oct 2007

    Posted 25 Apr 2008 Link to this post

    i am also finding these types of issues.

    i have added a tabstrip, radwindowmanager and radcombobox to a page and it has become very "heavy".

    Once i remove these items and replace with standard asp.net controls it is much much quicker.

    are there any techniques we can use to minimize all the overhead?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Piyush Bhatt
    Piyush Bhatt avatar
    166 posts
    Member since:
    Nov 2007

    Posted 25 Apr 2008 Link to this post

    Check this post:

    http://www.telerik.com/community/forums/thread/b311D-bdccec.aspx

    And try this - put following script in your pages
    <script>
    var stdt = new Date();
    function pageLoad()
    {
     var endt = new Date();
     alert(endt-stdt);
    }
    </script>

    You would see how long it takes to load the page after it's render.
    -Piyush
  5. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 25 Apr 2008 Link to this post

    Stuart-

    I ran your test sites through the online stopwatch and didn't observe a significant different in the load times of your page across the versions. Please see the results of my tests below in both IE7 and FF2 with primed and unprimed cache:

    Firefox
    Q1 2008 - 3.785 unprimed, 0.902 primed
    Q3 Prometheus - 3.778 unprimed, 1.15 primed
    Q3 Classic - 3.890 unprimed, 0.901 primed

    IE
    Q1 2008 - 0.510 unprimed, 0.219 primed
    Q3 Prometheus - 0.220 unprimed, 0.259 primed
    Q3 Classic - 0.215 unprimed, 0.232 primed

    Clearly IE shows a big advantage for rendering your page, which is largely due to FireFox's widely accepted slower rendering performance. Still, the key is that for each browser the version of the controls you're using isn't making much difference, which I'd generally attribute to the fact you're not using many controls the test page. Do you have a version of this test page that doesn't use any Telerik controls I can run through the same timer?

    In the mean time, I am beginning work on a new "Tips & Tricks" paper for optimizing ASP.NET AJAX apps, so stay tuned for that soon to help you squeeze every last bit of performance out of your app.

    -Todd
  6. Stuart
    Stuart avatar
    102 posts
    Member since:
    Jul 2012

    Posted 26 Apr 2008 Link to this post

    Yes but our clients wont be using online stopwatch to load their pages, their results will be the actual time in seconds they will be waiting for a web page to load on a broadband connection.

    Now for my code I run a code profiler through to catch any potential performance bottlenecks, then run through a optimisation service , to see which files are too large

    now here is the code behind file , its pretty well documented and if you have and questions ask me
    1 using System; 
    2 using System.Data; 
    3 using System.Configuration; 
    4 using System.Collections; 
    5 using System.Web; 
    6 using System.Web.Security; 
    7 using System.Web.UI; 
    8 using System.Web.UI.WebControls; 
    9 using System.Web.UI.WebControls.WebParts; 
    10 using System.Web.UI.HtmlControls; 
    11 using Telerik.WebControls; 
    12 using Telerik.Web.UI; 
    13 using System.Data.SqlClient; 
    14 using cyScape.BrowserHawk; 
    15 using System.IO; 
    16  
    17 public partial class Default : System.Web.UI.Page 
    18 {     
    19     bool jsActive = false
    20     FrontCode frontCode; 
    21     ArrayList mainMenuIDs = new ArrayList(); 
    22     Tombstones tombstones; 
    23     public string newsShow = "'true'"
    24     public string tombstone = "'true'"
    25  
    26     protected void Page_Load(object sender, EventArgs e) 
    27     { 
    28         if (Session["FrontCode"] == null
    29         { 
    30             frontCode = new FrontCode(Server.MapPath("~/App_Data")); 
    31             Session["FrontCode"] = frontCode; 
    32         } 
    33         else 
    34         { 
    35             frontCode = (FrontCode)Session["FrontCode"]; 
    36         } 
    37         tombstones = new Tombstones(frontCode.getConnection()); 
    38      
    39         if (!IsPostBack) 
    40         { 
    41             if (Session["Page"] == null
    42             { 
    43                 if (Request.QueryString["PageID"] != null
    44                 { 
    45                     Session["Page"] = Request.QueryString["PageID"].ToString(); 
    46                 } 
    47             } 
    48             else if (Request.QueryString["PageID"] != null
    49             { 
    50                 Session["Page"] = Request.QueryString["PageID"].ToString(); 
    51             } 
    52             if (Session["JSActive"] == null
    53             { 
    54                 BrowserObj bhObj = BrowserObj.GetBrowser(); 
    55                 ExtendedOptions options = new ExtendedOptions(); 
    56                 options.AddProperties("JavaScriptEnabled"); 
    57                 options.CacheToken = "bhresults"
    58                 options.PageMessage = "&nbsp;"
    59                 options.PageTitle = "Please wait"
    60                 options.BodyTag = "BGCOLOR=#3F6B8C"
    61                 options.RequestType = 3; 
    62                 ExtendedBrowserObj brow = BrowserObj.GetExtendedBrowser(options); 
    63                 Session["JSActive"] = brow.JavaScriptEnabled; 
    64             } 
    65             frontCode.OpenConnection(); 
    66             jsActive = bool.Parse(Session["JsActive"].ToString()); 
    67             SetContent(true); 
    68             frontCode.CloseConnection(); 
    69             if (jsActive) 
    70             { 
    71                 menuPanel.Visible = true
    72                 qmenu.Style["visibility"] = "hidden"
    73             } 
    74             else 
    75             { 
    76                 menuPanel.Visible = false
    77                 qmenu.Style["Visibility"] = "show"
    78             } 
    79         }    
    80     }    
    81     private void checkAdmin() 
    82     { 
    83         if (Session["AdminName"] != null
    84         { 
    85             adminContainer.Style["Display"] = "block"
    86             adminContainer.Style["Position"] = "absolute"
    87             adminContainer.Style["top"] = "1px"
    88             adminContainer.Style["left"] = "1px"
    89             //Set Links 
    90             adminAlt.HRef = "JavaScript:ALTEdit('"+getPage()+"','"+getLang()+"')"
    91             adminEdit.HRef = "JavaScript:ContentEdit('" + getPage() + "','" + getLang() + "')"
    92             adminSEO.HRef = "JavaScript:SEOEdit('" + getPage() + "','" + getLang() + "')"
    93         } 
    94     } 
    95     protected void homeImg_Click(object sender, ImageClickEventArgs e) 
    96     { 
    97         frontCode.OpenConnection(); 
    98         foreach (RadPanelItem it in menuPanel.Items) 
    99         { 
    100             it.Expanded = false
    101             it.Selected = false
    102         } 
    103         Session["Page"] = 1; 
    104         jsActive = bool.Parse(Session["JsActive"].ToString()); 
    105         SetContent(true); 
    106         frontCode.CloseConnection(); 
    107     }   
    108     public void setLayout(bool showNews) 
    109     { 
    110         if (showNews) 
    111         { 
    112               newsShow = "'true'"
    113         } 
    114         else 
    115         { 
    116               newsShow = "'false'"
    117         }   
    118     } 
    119     private void SetContent(bool isajaxRueqest) 
    120     { 
    121         try 
    122         { 
    123             bool showContent = MemberLoginCheck(getPage()); 
    124             string query = "SELECT * FROM [Lang/Page] Where (PageID = " + getPage() + ") AND (LangID = " + getLang() + ");"
    125             SqlConnection conn = frontCode.getConnection(); 
    126  
    127             SqlCommand comm = conn.CreateCommand(); 
    128             comm.CommandText = query; 
    129             SqlDataReader reader = comm.ExecuteReader(); 
    130             if (reader.Read()) 
    131             { 
    132                 //SEO// 
    133                 if (!reader.IsDBNull(4)) 
    134                 { 
    135                     Title = reader.GetString(4); 
    136                 } 
    137                 else 
    138                 { 
    139                     Title = "||No Title||"
    140                 } 
    141                 if (!reader.IsDBNull(5)) 
    142                 { 
    143                     metaDesc.Content = reader.GetString(5); 
    144                 } 
    145                 if (!reader.IsDBNull(6)) 
    146                 { 
    147                     metaKeyWords.Content = reader.GetString(6); 
    148                 } 
    149                 if (!reader.IsDBNull(7)) 
    150                 { 
    151                     metaFeatures.Content = reader.GetString(7); 
    152                 } 
    153                 if (!reader.IsDBNull(8)) 
    154                 { 
    155                     h1Tag.InnerHtml = reader.GetString(8); 
    156                 } 
    157                 if (!reader.IsDBNull(9)) 
    158                 { 
    159                     h2Tag.InnerHtml = reader.GetString(9); 
    160                 } 
    161                 if (!jsActive) 
    162                 { 
    163                     noscriptTags.InnerHtml = frontCode.getNoscriptLinks(); 
    164                 } 
    165                 //Wysiwyg// 
    166                 if (!reader.IsDBNull(10)) 
    167                 { 
    168                     if (showContent) 
    169                     { 
    170                         string content = reader.GetString(10); 
    171                         contentDiv.InnerHtml = content; 
    172                     } 
    173                     else 
    174                     { 
    175                         contentDiv.InnerHtml = "<div class='Header'>Membership Required</div><br/><div class='Content'>Membership Login Required <a id='memberBut' href='JavaScript:loadWindow()'>click</a> here to sign up or log in</div>"
    176                     } 
    177                 } 
    178                 //Alt Tags// 
    179                 if (!reader.IsDBNull(11)) 
    180                 { 
    181                     img2.AlternateText = reader.GetString(11); 
    182                     if (!reader.IsDBNull(15))  
    183                     { 
    184                         if (reader.GetString(15).Equals("0"))//Default 
    185                         { 
    186                             img2.ImageUrl = "~/images/transp.gif"
    187                         } 
    188                         else if (reader.GetString(15).Equals("1"))//Leisure and Trav 
    189                         { 
    190                             img2.ImageUrl = "~/images/lts.jpg"
    191                         } 
    192                         else if (reader.GetString(15).Equals("2"))//Consumer and Ret 
    193                         { 
    194                             img2.ImageUrl = "~/images/crs.jpg"
    195                         } 
    196                         else if (reader.GetString(15).Equals("3"))//Financial 
    197                         { 
    198                             img2.ImageUrl = "~/images/fs.jpg"
    199                         } 
    200                         else if (reader.GetString(15).Equals("4"))//other 
    201                         { 
    202                             img2.ImageUrl = "~/images/os.jpg"
    203                         } 
    204                     } 
    205                 } 
    206                 //Layout 
    207                 setLayout(reader.GetBoolean(14)); 
    208             } 
    209             
    210             reader.Close(); 
    211  
    212             contentDiv.InnerHtml = frontCode.SetSitemapData(contentDiv.InnerHtml, getLang()); 
    213             contentDiv.InnerHtml = frontCode.GetContentListData(contentDiv.InnerHtml, getLang()); 
    214             footNote.InnerHtml = frontCode.GetFootNote(); 
    215             if (!jsActive) 
    216             {                 
    217                 contentDiv.InnerHtml = frontCode.rewritetoNonJS(contentDiv.InnerHtml); 
    218                 footNote.InnerHtml = frontCode.rewritetoNonJS(footNote.InnerHtml); 
    219                  
    220             } 
    221             bool containsTombstone = false
    222             if (contentDiv.InnerHtml.Contains("||FITombGrid||")) 
    223             { 
    224                 contentDiv.InnerHtml = contentDiv.InnerHtml.Replace("||FITombGrid||",tombstones.getTombstones(0,0)); 
    225                 containsTombstone = true
    226             } 
    227             if (contentDiv.InnerHtml.Contains("||TLTombGrid||")) 
    228             { 
    229                 contentDiv.InnerHtml = contentDiv.InnerHtml.Replace("||TLTombGrid||", tombstones.getTombstones(1, 0)); 
    230                 containsTombstone = true
    231             } 
    232             if (contentDiv.InnerHtml.Contains("||CRTombGrid||")) 
    233             { 
    234                 contentDiv.InnerHtml = contentDiv.InnerHtml.Replace("||CRTombGrid||", tombstones.getTombstones(2, 0)); 
    235                 containsTombstone = true
    236             } 
    237             if (contentDiv.InnerHtml.Contains("||OSTombGrid||")) 
    238             { 
    239                 contentDiv.InnerHtml = contentDiv.InnerHtml.Replace("||OSTombGrid||", tombstones.getTombstones(3, 0)); 
    240                 containsTombstone = true
    241             } 
    242             if (containsTombstone) 
    243             { 
    244                 setLayout(false); 
    245                 tombstone = "'true'"
    246                  
    247             } 
    248             else 
    249             { 
    250                 tombstone = "'false'"
    251             } 
    252             checkAdmin(); 
    253             conn.Close(); 
    254         } 
    255         catch (Exception) 
    256         { 
    257         } 
    258         finally 
    259         { 
    260             frontCode.CloseConnection(); 
    261         }                        
    262     } 
    263     private int getLang() 
    264     { 
    265         int lang = 1; 
    266          
    267         return lang; 
    268     } 
    269     private int getPage() 
    270     { 
    271         int page = 0; 
    272         if (Session["Page"] != null
    273         { 
    274             page = int.Parse(Session["Page"].ToString()); 
    275         } 
    276         if (!frontCode.checkPageExists(page)) 
    277         { 
    278             page = frontCode.getDefaultPage(); 
    279         } 
    280         Session["Page"] = page; 
    281         return page; 
    282     }      
    283     protected void pAjaxMan_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) 
    284     { 
    285         if (Session["JSActive"] != null
    286         { 
    287             jsActive = bool.Parse(Session["JsActive"].ToString()); 
    288         } 
    289         else 
    290         { 
    291             Session["JSActive"] = true
    292             jsActive = true
    293         } 
    294         string argument = e.Argument.ToString(); 
    295         frontCode.OpenConnection(); 
    296  
    297         if (argument.Contains("AjaxRequest")) 
    298         { 
    299             Session["JSActive"] = true
    300             jsActive = true
    301              
    302         } 
    303         else if(argument.Contains("refresh")) 
    304         { 
    305         } 
    306         else 
    307         { 
    308             Session["Page"] = argument; 
    309             foreach (RadPanelItem it in menuPanel.Items) 
    310             { 
    311                 it.Expanded = false
    312                 it.Selected = false
    313             } 
    314             try 
    315             { 
    316                 menuPanel.FindItemByValue(argument).ExpandParentItems(); 
    317                 menuPanel.FindItemByValue(argument).Selected = true;             
    318             } 
    319             catch (Exception){}         
    320         } 
    321         jsActive = bool.Parse(Session["JsActive"].ToString()); 
    322         SetContent(true); 
    323  
    324         frontCode.CloseConnection(); 
    325     } 
    326     private bool MemberLoginCheck(int pageID) 
    327     { 
    328         bool showContent = false
    329         if (frontCode.IsMemberPage(pageID)) 
    330         { 
    331             if (Session["AfriMember"] == null
    332             { 
    333                 showContent = false
    334             } 
    335             else 
    336             { 
    337                 showContent = true
    338             } 
    339         } 
    340         else 
    341         { 
    342             showContent = true
    343         } 
    344         return showContent; 
    345     } 
    346     protected void menuPanel_Load(object sender, EventArgs e) 
    347     { 
    348         if (!IsPostBack) 
    349         { 
    350             menuPanel.LoadContentFile("/App_Data/PanelMenu.xml");    
    351         }         
    352     } 
    353  
    354 protected void  menuPanel_ItemClick(object sender, RadPanelbarEventArgs e) 
    355
    356     string argument = e.Item.Value; 
    357         if (Session["JSActive"] != null
    358         { 
    359             jsActive = bool.Parse(Session["JsActive"].ToString()); 
    360         } 
    361         else 
    362         { 
    363             Session["JSActive"] = true
    364             jsActive = true
    365         } 
    366         frontCode.OpenConnection(); 
    367         if (!argument.Equals("")) 
    368         { 
    369             Session["Page"] = argument; 
    370             foreach (RadPanelItem it in menuPanel.Items) 
    371             { 
    372                 it.Expanded = false
    373                 it.Selected = false
    374             } 
    375             try 
    376             { 
    377                 menuPanel.FindItemByValue(argument).ExpandParentItems(); 
    378                 menuPanel.FindItemByValue(argument).Selected = true
    379             } 
    380             catch (Exception) { } 
    381         } 
    382         jsActive = bool.Parse(Session["JsActive"].ToString()); 
    383         SetContent(false); 
    384  
    385         frontCode.CloseConnection(); 
    386
    387
    388  
    Also here is the front code class that get called

    1 using System; 
    2 using System.Data; 
    3 using System.Configuration; 
    4 using System.Web; 
    5 using System.Web.Security; 
    6 using System.Web.UI; 
    7 using System.Web.UI.WebControls; 
    8 using System.Web.UI.WebControls.WebParts; 
    9 using System.Web.UI.HtmlControls; 
    10 using System.Data.SqlClient; 
    11 using System.Collections; 
    12  
    13 /// <summary> 
    14 /// Code that handles some database communication for the CMS frontEnd App 
    15 /// </summary> 
    16 public class FrontCode 
    17
    18     ArrayList langList; 
    19     ArrayList pageList; 
    20     ArrayList loginCatPages; 
    21     DataSet linkData = new DataSet(); 
    22     DataSet catData = new DataSet(); 
    23     BusinessResource br; 
    24     SqlConnection conn; 
    25  
    26     public FrontCode(string setupPath) 
    27     { 
    28         conn = new SqlConnection(ConfigurationManager.ConnectionStrings[1].ToString()); 
    29         br = new BusinessResource(setupPath); 
    30         conn.Open(); 
    31         setLinkData(); 
    32         conn.Close(); 
    33     } 
    34     public void OpenConnection() 
    35     { 
    36         if (conn.State == ConnectionState.Closed) 
    37         { 
    38             conn.Open(); 
    39         } 
    40          
    41     } 
    42     public void CloseConnection() 
    43     { 
    44         conn.Close(); 
    45     } 
    46     public SqlConnection getConnection() 
    47     { 
    48         return conn; 
    49     } 
    50     public int getDefaultLang() 
    51     { 
    52         int i = 0
    53         i = int.Parse(br.getDefaultLang()); 
    54         if (!checkLangExists(i)) 
    55         { 
    56             i = int.Parse(langList[0].ToString()); 
    57         } 
    58         return i; 
    59     } 
    60     public int getDefaultPage() 
    61     { 
    62         int i = 0
    63         i = int.Parse(br.getHomePage()); 
    64         if (!checkPageExists(i)) 
    65         { 
    66             i = int.Parse(pageList[0].ToString()); 
    67         } 
    68         return i; 
    69     } 
    70     public bool checkLangExists(int lang) 
    71     { 
    72         bool flag = false
    73         if (langList == null) 
    74         { 
    75             langList = new ArrayList(); 
    76             SqlCommand comm = conn.CreateCommand(); 
    77             comm.CommandText = "SELECT LangID FROM Languages;"
    78             SqlDataReader reader = comm.ExecuteReader(); 
    79             while (reader.Read()) 
    80             { 
    81                 langList.Add(reader.GetInt32(0)); 
    82             } 
    83             reader.Close(); 
    84         } 
    85         for (int i = 0; i < langList.Count; i++) 
    86         { 
    87             if (lang == int.Parse(langList[i].ToString())) 
    88             { 
    89                 flag = true
    90                 i = langList.Count; 
    91             }             
    92         } 
    93         return flag;         
    94     } 
    95     public bool checkPageExists(int page) 
    96     { 
    97         bool flag = false
    98         if (pageList == null) 
    99         { 
    100             pageList = new ArrayList(); 
    101             SqlCommand comm = conn.CreateCommand(); 
    102             comm.CommandText = "SELECT PageID FROM Pages;"
    103             SqlDataReader reader = comm.ExecuteReader(); 
    104             while (reader.Read()) 
    105             { 
    106                 pageList.Add(reader.GetInt32(0)); 
    107             } 
    108             reader.Close(); 
    109         } 
    110         for (int i = 0; i < pageList.Count; i++) 
    111         { 
    112             if (page == int.Parse(pageList[i].ToString())) 
    113             { 
    114                 flag = true
    115                 i = pageList.Count; 
    116             } 
    117         } 
    118         return flag;   
    119     } 
    120     public string rewritetoNonJS(string code) 
    121     { 
    122         string codecoderet = code; 
    123         if (linkData.Tables.Count < 1
    124         { 
    125             setLinkData(); 
    126         } 
    127         int i; 
    128         for (i = 0; i < linkData.Tables[0].Rows.Count; i++) 
    129         { 
    130             string ajaxlink = "JavaScript:gotopage(" + linkData.Tables[0].Rows[i][0].ToString() + ")"; 
    131             string ajaxlink2 = "JavaScript:gotoPage(" + linkData.Tables[0].Rows[i][0].ToString() + ")"; 
    132             string ajaxlink3 = "javascript:gotoPage(" + linkData.Tables[0].Rows[i][0].ToString() + ")"; 
    133              
    134             string isapiLink = linkData.Tables[0].Rows[i][2].ToString()+"_"+linkData.Tables[0].Rows[i][0].ToString()+".html"; 
    135             coderetcoderet = coderet.Replace(ajaxlink, isapiLink); 
    136             coderetcoderet = coderet.Replace(ajaxlink2, isapiLink); 
    137             coderetcoderet = coderet.Replace(ajaxlink3, isapiLink); 
    138         } 
    139         return coderet; 
    140     } 
    141     public string getNoscriptLinks() 
    142     { 
    143         string links = ""
    144         if (linkData.Tables.Count < 1
    145         { 
    146             setLinkData(); 
    147         } 
    148         for (int i = 0; i < linkData.Tables[0].Rows.Count; i++) 
    149         { 
    150             links += "<href='" + linkData.Tables[0].Rows[i][2].ToString() + "_" + linkData.Tables[0].Rows[i][0].ToString() + ".html'>" + linkData.Tables[0].Rows[i][1].ToString() + "</a>&nbsp;&nbsp;|&nbsp;&nbsp;"; 
    151         } 
    152          
    153         return links; 
    154     } 
    155     private void setLinkData() 
    156     { 
    157         SqlDataAdapter adapter = new SqlDataAdapter("SELECT PageID, LinkText, ISAPIText FROM [Lang/Page];", conn); 
    158         linkData = new DataSet(); 
    159         adapter.Fill(linkData); 
    160     } 
    161     private void setLoginCatPagesList() 
    162     { 
    163         loginCatPages = new ArrayList(); 
    164         SqlCommand comm = conn.CreateCommand(); 
    165         comm.CommandText = "SELECT PageID FROM Pages WHERE CategoryID = 3;"
    166         SqlDataReader reader = comm.ExecuteReader(); 
    167         while (reader.Read()) 
    168         { 
    169             loginCatPages.Add(reader.GetInt32(0)); 
    170         } 
    171         reader.Close(); 
    172     } 
    173     public bool IsMemberPage(int pageID) 
    174     { 
    175         bool flag = false
    176         if (loginCatPages == null) 
    177         { 
    178              
    179             setLoginCatPagesList(); 
    180         } 
    181         for (int i = 0; i < loginCatPages.Count; i++) 
    182         { 
    183             if(pageID == int.Parse(loginCatPages[i].ToString())) 
    184             { 
    185                 flag = true
    186             } 
    187         } 
    188         return flag; 
    189     } 
    190     public string GetFootNote() 
    191     { 
    192         string s = ""
    193         SqlCommand comm = conn.CreateCommand(); 
    194         comm.CommandText = "SELECT Top(1) FootCode FROM Footers ORDER BY NewID()"
    195         SqlDataReader reader = comm.ExecuteReader(); 
    196         if (reader.Read()) 
    197         { 
    198             s = reader.GetString(0); 
    199         } 
    200         reader.Close(); 
    201         return s; 
    202     } 
    203     public string SetSitemapData(string code, int langId) 
    204     { 
    205         string codecodeRet = code; 
    206         if (catData.Tables.Count < 1
    207         { 
    208             GetCategories(); 
    209         } 
    210         for (int i = 0; i < catData.Tables[0].Rows.Count; i++) 
    211         { 
    212             if (codeRet.Contains("||SiteMap" +  catData.Tables[0].Rows[i][0].ToString() + "||")) 
    213             { 
    214                 codeRetcodeRet = codeRet.Replace("||SiteMap" + catData.Tables[0].Rows[i][0].ToString() + "||", GetLinksList(int.Parse(catData.Tables[0].Rows[i][0].ToString()), langId)); 
    215             } 
    216         } 
    217         return codeRet; 
    218     } 
    219     private void GetCategories() 
    220     { 
    221         string query = "SELECT * FROM Categories;"
    222         SqlDataAdapter adapter = new SqlDataAdapter(query, conn); 
    223         adapter.Fill(catData); 
    224     } 
    225     private string GetLinksList(int category, int lang) 
    226     { 
    227         string s = ""
    228         string query = "SELECT [Lang/Page].PageID, [Lang/Page].LinkText, Pages.CategoryID, [Lang/Page].LangID FROM [Lang/Page] INNER JOIN Pages ON [Lang/Page].PageID = Pages.PageID WHERE ([Lang/Page].LangID = " + lang + ") AND (Pages.CategoryID = "+category+");"; 
    229         SqlDataAdapter adapter = new SqlDataAdapter(query, conn); 
    230         DataSet data = new DataSet(); 
    231         adapter.Fill(data); 
    232         for (int j = 0; j < data.Tables[0].Rows.Count; j++) 
    233         { 
    234             s += "<href='JavaScript:gotoPage("+data.Tables[0].Rows[j][0].ToString()+")'>" + data.Tables[0].Rows[j][1].ToString()+ "<br/>"; 
    235         } 
    236         return s; 
    237     } 
    238     public string GetContentListData(string code, int langId) 
    239     { 
    240         string content = code
    241         for (int i = 0; i < catData.Tables[0].Rows.Count; i++) 
    242         { 
    243             if (content.Contains("||ContentList" + catData.Tables[0].Rows[i][0].ToString() + "||")) 
    244             { 
    245                 contentcontent = content.Replace("||ContentList" + catData.Tables[0].Rows[i][0].ToString() + "||", ListCodeByCategory(int.Parse(catData.Tables[0].Rows[i][0].ToString()), langId)); 
    246             } 
    247         } 
    248         return content; 
    249     } 
    250     private string ListCodeByCategory(int catId, int langId) 
    251     { 
    252         string code = ""
    253         SqlDataAdapter adapter = new SqlDataAdapter("SELECT [Lang/Page].WYSIWYG FROM [Lang/Page] INNER JOIN Pages ON [Lang/Page].PageID = Pages.PageID WHERE (Pages.CategoryID = "+catId+") AND ([Lang/Page].LangID = "+langId+")", conn); 
    254         DataSet data = new DataSet(); 
    255         adapter.Fill(data); 
    256         if (data.Tables.Count > 0) 
    257         { 
    258             for (int i = 0; i < data.Tables[0].Rows.Count; i++) 
    259             { 
    260                 code += "<br/>" + data.Tables[0].Rows[i][0].ToString()+"<br/>"; 
    261             } 
    262         } 
    263         return code; 
    264     } 
    265
    266  

    and here is the code for the default.aspx file that uses Q3 2007

    1 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %> 
    2  
    3 <%@ Register Assembly="RadPanelbar.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %> 
    4  
    5 <%@ Register Src="QuickMenu.ascx" TagName="QuickMenu" TagPrefix="uc1" %> 
    6 <%@ Register Assembly="RadRotator.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %> 
    7 <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
    8 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    9 <html xmlns="http://www.w3.org/1999/xhtml"
    10 <head runat="server"
    11     <title></title
    12     <meta name="verify-v1" content="fImTSBuEhPmzGtOhOGPVUQXu0BIt6Jp5Tu9DYlf/RuY=" /> 
    13     <meta id="metaDesc" name="Description" runat="server" content="" /> 
    14     <meta name="Author" content="PCW New Media" /> 
    15     <meta name="Robots" content="All" /> 
    16     <meta id="metaKeyWords" name="Keywords" runat="server" content="" /> 
    17     <meta id="metaFeatures" name="Features" runat="server" content="" /> 
    18     <link rel="Stylesheet" type="text/css" href="../Styles/ContentStyles.css" /> 
    19     <link rel="Stylesheet" type="text/css" href="../Styles/LayoutStyles.css" />     
    20     <script language="javascript" type="text/javascript" src="Scripts/AdminWindowsnew.js"></script> 
    21  
    22 </head> 
    23 <body onload="restore();" onresize="restore();" style="text-align: center"
    24     <h1 runat="server" id="h1Tag" class="headTags" enableviewstate="false" /> 
    25     <h2 runat="server" id="h2Tag" class="headTags" enableviewstate="false" /> 
    26     <noscript id="noscriptTags" class="headTags" runat="server" enableviewstate="false"
    27     </noscript> 
    28     <form id="mainForm" runat="server"
    29         <asp:ScriptManager ID="ScriptManager1" runat="server"
    30         </asp:ScriptManager> 
    31         <telerik:RadAjaxManager ID="pAjaxMan" runat="server" OnAjaxRequest="pAjaxMan_AjaxRequest" 
    32             EnablePageHeadUpdate="False" EnableHistory="True" EnableTheming="False"
    33             <AjaxSettings> 
    34                 <telerik:AjaxSetting AjaxControlID="menuPanel"
    35                     <UpdatedControls>    
    36                         <telerik:AjaxUpdatedControl ControlID="menuPanel" />                      
    37                         <telerik:AjaxUpdatedControl ControlID="homeImg" /> 
    38                         <telerik:AjaxUpdatedControl ControlID="img2" /> 
    39                         <telerik:AjaxUpdatedControl ControlID="scrollPanel" LoadingPanelID="ajaxLoader" />                         
    40                         <telerik:AjaxUpdatedControl ControlID="adminContainer" /> 
    41                         <telerik:AjaxUpdatedControl ControlID="showHideBlock" /> 
    42                     </UpdatedControls> 
    43                 </telerik:AjaxSetting> 
    44                 <telerik:AjaxSetting AjaxControlID="pAjaxMan"
    45                     <UpdatedControls>    
    46                         <telerik:AjaxUpdatedControl ControlID="menuPanel" />                      
    47                         <telerik:AjaxUpdatedControl ControlID="homeImg" /> 
    48                         <telerik:AjaxUpdatedControl ControlID="img2" /> 
    49                         <telerik:AjaxUpdatedControl ControlID="scrollPanel" LoadingPanelID="ajaxLoader" />                         
    50                         <telerik:AjaxUpdatedControl ControlID="adminContainer" /> 
    51                         <telerik:AjaxUpdatedControl ControlID="showHideBlock" /> 
    52                     </UpdatedControls> 
    53                 </telerik:AjaxSetting> 
    54                 <telerik:AjaxSetting AjaxControlID="homeImg"
    55                     <UpdatedControls>    
    56                         <telerik:AjaxUpdatedControl ControlID="menuPanel" />                      
    57                         <telerik:AjaxUpdatedControl ControlID="homeImg" /> 
    58                         <telerik:AjaxUpdatedControl ControlID="img2" /> 
    59                         <telerik:AjaxUpdatedControl ControlID="scrollPanel" LoadingPanelID="ajaxLoader" />                         
    60                         <telerik:AjaxUpdatedControl ControlID="adminContainer" /> 
    61                         <telerik:AjaxUpdatedControl ControlID="showHideBlock" /> 
    62                     </UpdatedControls> 
    63                 </telerik:AjaxSetting> 
    64             </AjaxSettings> 
    65             <ClientEvents OnResponseEnd="ajaxEnd()" /> 
    66         </telerik:RadAjaxManager> 
    67         <br /> 
    68         <br /> 
    69         <table id="containerTab" style="background-color: #3F6B8C;" align="center" border="0" 
    70             cellpadding="0" cellspacing="0"
    71             <tr> 
    72                 <td valign="bottom"
    73                     <div id="mainContainer" class="mainContainer" align="center"
    74                         <div id="mainSection" class="mainSection" align="center"
    75                             <div id="headSection" class="headSection" align="center"
    76                                 <div style="vertical-align: top" id="ccsss"
    77                                     <table id="ptable" border="0" cellpadding="0" cellspacing="0" class="headTableCo"
    78                                         <tr> 
    79                                             <td style="width: 241px"
    80                                                 <asp:ImageButton ID="homeImg" runat="server" BorderStyle="None" Height="147px" ImageUrl="~/Images/transp.gif" 
    81                                                     OnClick="homeImg_Click" Width="100%" BorderWidth="0px" ToolTip="Home" /></td
    82                                             <td valign="top" style="text-align: left"
    83                                                 <asp:Image ID="img2" runat="server" Height="147px" ImageUrl="~/Images/transp.gif" 
    84                                                     Width="720px" BorderWidth="0px" /> 
    85                                             </td> 
    86                                         </tr> 
    87                                     </table> 
    88                                 </div> 
    89                             </div> 
    90                             <div id="midSection" class="midSection" runat="server"
    91                                 <table border="0" cellpadding="0" cellspacing="0" class="midContentTable" 
    92                                     style="background-color: white"
    93                                     <tr> 
    94                                         <td class="menuCell"
    95                                             &nbsp;<rad:RadPanelbar ID="menuPanel" runat="server" OnLoad="menuPanel_Load" Skin="Aruba" 
    96                                                 OnItemClick="menuPanel_ItemClick" CausesValidation="False" ExpandMode="SingleExpandedItem"
    97                                                 <CollapseAnimation Duration="100" /> 
    98                                                 <ExpandAnimation Duration="100" /> 
    99                                             </rad:RadPanelbar> 
    100                                             <div id="qmenu" runat="server"></div> 
    101                                         </td> 
    102                                         <td class="contentCell" id="contentCell" style="width:775px; padding-left:5px; padding-right:5px; border-right-style:none"
    103                                             <asp:Panel ID="scrollPanel" runat="server" Height="480px" ScrollBars="Auto" Width="100%" 
    104                                                 BackColor="White" Direction="LeftToRight" HorizontalAlign="Left"
    105                                                 <div id="contentDiv" runat="server" class="contentDiv"
    106                                                 </div> 
    107                                             </asp:Panel> 
    108                                         </td> 
    109                                         <td class="newsCell" id="newsCell" style="display:none"
    110                                             <div id="NewsContainer" class="NewsContainer"
    111                                                 <div class="newsBarHead"
    112                                                     &nbsp;Client Quotes</div> 
    113                                                 <div class="ClientQuotesDiv" id="clientQuoteDiv"
    114                                                 </div> 
    115                                                 <div class="NewsFeedHeader"
    116                                                     &nbsp;News</div> 
    117                                                 <div class="NewsFeedCont" id="NewsFeedCont"
    118                                                 </div> 
    119                                                 <href="mailto:stephaniev@nwcf.com"
    120                                                     <div class="NewsBottom" style="cursor: hand; background-image: url(../Images/NewsBottom1.gif); 
    121                                                         background-repeat: no-repeat; width: 224px; background-color: White; height: 81px; 
    122                                                         padding: 3px 5px 0px 5px;"> 
    123                                                     </div> 
    124                                                 </a> 
    125                                             </div> 
    126                                         </td> 
    127                                     </tr> 
    128                                     <tr> 
    129                                         <td colspan="3"
    130                                             <div class="footSection" id="pageFoot"
    131                                             </div> 
    132                                         </td> 
    133                                     </tr> 
    134                                 </table> 
    135                             </div> 
    136                         </div> 
    137                     </div> 
    138                 </td> 
    139             </tr> 
    140             <tr> 
    141                 <td valign="top" align="center"
    142                     <br /> 
    143                     <div class="footerLink" id="footNote" runat="server"
    144                     </div> 
    145                     <br /> 
    146                     <br /> 
    147                     <br /> 
    148                 </td> 
    149             </tr> 
    150         </table> 
    151         <telerik:RadAjaxLoadingPanel ID="ajaxLoader" runat="server" Height="75px" Width="75px" 
    152             Transparency="5"
    153             <img alt="Loading..." src='RadControls/Ajax/Skins/Default/NWCFLoad.gif' style="border: 0px;" /> 
    154         </telerik:RadAjaxLoadingPanel> 
    155         <div id="adminContainer" class="adminContainer" runat="server"
    156             <table border="0" cellpadding="0" cellspacing="0" class="adminTable"
    157                 <tr> 
    158                     <td colspan="2"
    159                         <strong><span style="text-decoration: underline">Administrator Tools</span></strong
    160                     </td> 
    161                 </tr> 
    162                 <tr> 
    163                     <td> 
    164                         Search Engine Optimisation 
    165                     </td> 
    166                     <td> 
    167                         <id="adminSEO" runat="server" href=""
    168                             <img alt="Search Engine Optimisation" class="admimg" src="Admin/AdminStyles/Images/SEOIco.gif" /></a
    169                     </td> 
    170                 </tr> 
    171                 <tr> 
    172                     <td> 
    173                         Alt Tags 
    174                     </td> 
    175                     <td> 
    176                         <id="adminAlt" runat="server" href=""
    177                             <img alt="Alt Tag Manager" class="admimg" src="Admin/AdminStyles/Images/wcag1-a.gif" /> 
    178                         </a> 
    179                     </td> 
    180                 </tr> 
    181                 <tr> 
    182                     <td> 
    183                         Editor 
    184                     </td> 
    185                     <td> 
    186                         <id="adminEdit" runat="server" href=""
    187                             <img alt="Content Editor" class="admimg" src="Admin/AdminStyles/Images/editor.gif" /> 
    188                         </a> 
    189                     </td> 
    190                 </tr> 
    191                 <tr> 
    192                     <td> 
    193                         Refresh Content 
    194                     </td> 
    195                     <td> 
    196                         <href="JavaScript:gotoPage('refresh')"
    197                             <img alt="Refresh Content" class="admimg" src="Admin/AdminStyles/Images/Update.gif" /> 
    198                         </a> 
    199                     </td> 
    200                 </tr> 
    201                 <tr> 
    202                     <td colspan="2"
    203                         <asp:Button ToolTip="Return to Admin" ID="returnToAdmin" runat="server" PostBackUrl="~/Admin/Welcome.aspx" 
    204                             Text="Back to Admin" Width="150px" /> 
    205                     </td> 
    206                 </tr> 
    207             </table> 
    208         </div> 
    209         <script language="javascript" type="text/javascript"
    210         <!-- 
    211          function shownews(showNews, showTombstone) 
    212                 { 
    213                     if(showNews){ 
    214                     document.getElementById('newsCell').style.display = "block"
    215                      document.getElementById('contentCell').style.width = "517px"
    216                      document.getElementById('contentCell').style.borderRightStyle="solid"
    217                      document.getElementById('pageFoot').style.backgroundImage = "url(Images/nwcf_bottom_line.gif)"
    218                      document.getElementById('NewsFeedCont').innerHTML = "<iframe id='newsiFrame' src='NewsRotate.aspx' frameborder='0' scrolling='no' width='225px' height= '100%' style='padding: 0px 0px 0px 0px; margin:0px 0px 0px 0px'></iframe>"
    219                      document.getElementById('clientQuoteDiv').innerHTML = "<iframe allowtransparency='no' frameborder='0' scrolling='no' src='Rotator.aspx' style='width: 100%; height: 100%; background-color: transparent'></iframe>"
    220                     }else{ 
    221                     document.getElementById('newsCell').style.display = "none"
    222                     document.getElementById('contentCell').style.width = "750px"
    223                     document.getElementById('contentCell').style.borderRightStyle"none"
    224                     document.getElementById('pageFoot').style.backgroundImage = "url(Images/nwcf_bottom_noline.gif)"
    225                     } 
    226                     if(showTombstone){ 
    227                     document.getElementById('contentCell').style.width = "775px"
    228                     document.getElementById('contentCell').style.paddingLeft = "5px"
    229                     document.getElementById('contentCell').style.paddingRight = "5px"
    230                     }else{ 
    231                     document.getElementById('contentCell').style.paddingLeft = "28px"
    232                     document.getElementById('contentCell').style.paddingRight = "8px"
    233                     } 
    234                 }        
    235         --> 
    236         </script> 
    237         <telerik:RadScriptBlock runat="server" ID="showHideBlock"
    238             <script language="javascript" type="text/javascript"
    239             <!-- 
    240             function newsbar() 
    241             { 
    242                 var showNews = false
    243                 var showtomb = false
    244                 if(<%= newsShow %> == 'true') 
    245                 {     
    246                     showNews = true;                 
    247                 } 
    248                 if(<%=tombstone %> == 'true') 
    249                 { 
    250                     showtomb = true
    251                 }        
    252                 shownews(showNews, showtomb)         
    253             } 
    254             function gotoPage(page) 
    255                 { 
    256                     var ajaxMan = <%= pAjaxMan.ClientID %>
    257                     ajaxMan.AjaxRequest(page);                     
    258                 } 
    259                  
    260                 --> 
    261             </script> 
    262         </telerik:RadScriptBlock> 
    263     </form> 
    264  
    265     <script language="javascript" type="text/javascript"
    266     <!-- 
    267         window.onload = ajaxLoad;   
    268         function restore()  
    269         { 
    270          if( typeof( window.innerWidth ) == 'number' )  
    271             {             
    272                 myWidth = window.innerWidth; 
    273                 myHeight = window.innerHeight; 
    274                 document.getElementById('footNote').style.paddingTop = '25px'
    275             } 
    276        }       
    277                 function ajaxLoad() 
    278                 { 
    279                 restore();                    
    280                 }                 
    281                 function ajaxEnd() 
    282                 { 
    283                     newsbar();                     
    284                     if( typeof( window.innerWidth ) == 'number' )  
    285                     {           
    286                     document.getElementById('footNote').style.paddingTop = '25px'
    287                     } 
    288                 }                 
    289           newsbar(); 
    290         --> 
    291     </script> 
    292  
    293 </body> 
    294 </html> 
    295  

    I have been observing the behavoiur of these sites for a full week now, and I found that with prometheus at sum point it seems to be waiting for the server to do something, I ran the firefox developers addon on the brwoser and checked in specific the document sizes , on Q1 2008 the webresources seems to be compressed, might this be the thing the client browser is waiting for ? for the app to finish the compression?

    Compression is great in certain scenarios, but where you run a very active web server , with mutiple websites each running off sql server , doing mirror backups and log shipping every 1 to 2 hours the processor might be a little too occupied to be doing a high end porcess like compression.

    Now compression might help the average 56k modem dial up guy but we have to admit if you are still running 56k connection you are pretty used to waiting by nowon your test i would just like to point out something

    IE
    Q1 2008 - 0.510 unprimed, 0.219 primed
    Q3 Prometheus - 0.220 unprimed, 0.259 primed
    Q3 Classic - 0.215 unprimed, 0.232 primed


    look at the unprimed diference between Q1 2008 and Q3 classic, not the load time but the difference between the load 0.510 / 0.215
    Q3 classic seems to run more than twice as fast unprimed than the Q1 2008

    It will be very good if you bring out the optimisation tricks and tips, because we aim to build proper functional websites that loads at tremendous speed for our clients.
  7. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 26 Apr 2008 Link to this post

    Stuart-

    You make some fair points about the results I posted. I will definitely bring the optimization articles online soon. I'll ask the product developers to look in to the scenario you're presenting to see if we can better define this "waiting" time you're observing.

    In the mean time, even with the differences we're talking about, are your customers unhappy with sub-second loading times on an unprimed cache? By most standards- with UI controls or not- that's tremendously fast. No excuse not to explore these issues deeper, but I want to make sure I clearly understand your load time targets so that we're not chasing an impossible number.

    Thanks-
    Todd
  8. Stuart
    Stuart avatar
    102 posts
    Member since:
    Jul 2012

    Posted 28 Apr 2008 Link to this post

    Hi Todd

    Yes I understand that there is a limit to how fast these tools can run, but prometheus is built on the concept of unsurpassed loading speeds and when the classic's toolkits speed is going faster it is cause for concern because me like many of your clients have switched over to using prometheus instead of classic. I am still using prometheus for a intranet I am building so speed is not so much a problem.

    But all in the people who will be using our sites are looking at 5-6 second loading times in the UK on broadband.

    Kind Regards

    Stu
  9. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 28 Apr 2008 Link to this post

    Stu-

    I definitely understand your concerns and will do everything I can to help you be successful with the new generation of ASP.NET AJAX controls. In almost all side-by-side comparisons I've seen so far, the RadControls for ASP.NET AJAX perform far and away better than their "classic" ASP.NET counterparts, so I am surprised you're seeing otherwise.

    If you have the time, try constructing a simple application that uses roughly the same controls as your current app and see if you notice the speed delta between ASP.NET AJAX and the classic controls. If you do, send the demos to our support staff so they can examine your setup and perhaps identify a script that is causing your issues.

    Thanks again for all of the good feedback and stay tuned for more optimization help.

    -Todd
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017