locked
performance slow RRS feed

  • Question

  • User-425599523 posted

    Hi I have just tested after adding this line in .aspx file

    <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

    the google pageinsight will be get least rank i.,e 87 rank,

    and I remove the above Ajax tage, I will get around 98 rank in the pageinsight.

    may i know, why the peformance is affected after addeding the ajaxcontrol toolkit

    fyi: https://developers.google.com/speed/pagespeed/insights/

    Tuesday, October 1, 2013 1:56 PM

Answers

  • User281315223 posted

    As I mentioned earlier bsarahim, don't rely too heavily on your PageSight ranking and certainly don't remove areas of your application to reduce it further just to get an arbitrary score from 87 to the mid-90s. 87 is a very respectable score for Google's PageSpeed Insights and you really aren't going to notice any major performance increases from moving it much higher than 87.

    Obviously, you could use jQuery and some of its available libraries and plug-ins, but this could put you in the same situation and you may find that you would need to reference additional libraries in there which could affect your PageSpeed score even further. If you have followed the major suggestions provided by PageSpeed insights, you should be in great shape and your site should perform as well as expected.

    I'll provide a few additional resources that I commonly recommend checking out when it comes to improving performance within ASP.NET Applications.

    The Web Developer Checklist

    If you want an excellent resource that encompasses a variety of methods to improve your website or web application, I cannot recommend the Web Developer Checklist enough.

    It features tools and resources that can help you analyze several aspects of your site including : 

    • Best Practices (ensuring that your markup is in good condition and features like spell-checking)
    • Mobile Analysis (checking that your site works well on Mobile devices)
    • Analytics Checking (tools for uptime monitoring and traffic analysis)
    • Performance (including Google PageSpeed Insights, Yahoo's YSlow and tips to optimize your sites Headers and Images)
    • Usability (tools to check HTML5 compliance , Search-friendly URLs and more)
    • Accessibility (ensuring your site can be accessed using screen readers and has appropriate contrast levels)
    • SEO (tools to analyze how accessible and readable your site is for Search Engine crawlers and more)
    • Code Quality (CSS, Javascript and HTML validation tools)
    • Semantics (checking for additional data within your site)
    • Security (checks for best practices for securing your site and preventing nasty things like XSS)
    • Social Media (checks if your site is properly connected up with social media sites like Twitter and Facebook)

    There is also an ASP.NET-specific version available on the site as well and one that focuses specifically on ASP.NET Performance. It's probably one of the best single resources that I have found for improving nearly all aspects of a website or web application.

    Consider YSlow 

    Another "PageSpeed" analyzer that you might want to consider looking into as well (that isn't nearly as stringent as Google PageSpeed) is Yahoo's YSlow Analyzer, which is very similar to Google's PageInsights and has different settings depending on the size of your site and application.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, October 5, 2013 8:07 AM

All replies

  • User281315223 posted

    Just because your rank fell within the Google PageSpeed Insights doesn't necessary reflect a direct change in the speed of your page or any of your percieved load times. 

    Based on my usage of PageSpeed and without actually seeing the results of your test myself, I would assume that this involves the fact that your script files for your AJAX Control Toolkit are not using deferred loading (which means that loading the content of the page may have to wait for your <script> to be loaded properly). I know that in the past I have used head.js to handle deferring any script files until after my content was loaded or to load Javascript files asyncronously, which might suit your needs.

    PageSpeed Insights will inform you of all of the steps that you need to take to achieve a higher score, but a score like 87 is nothing to worry about. It's always important to realize that metrics like those used here will not always directly translate to speed that the user notices.

    Tuesday, October 1, 2013 2:03 PM
  • User-718146471 posted

    Rion, can that head.js thing be used to process Ajax Toolkit and if so, how? Got any documentation on it? I have a site that uses some ajax and I'd like to slim down its footprint to speed it up.

    Tuesday, October 1, 2013 2:13 PM
  • User281315223 posted

    I personally haven't used it with something like the AjaxControlToolkit previously (I always used it to help speed up external JS files like jQuery or other dependencies). The documentation for using it is pretty straight-forward : 

    //This will load these scripts in parallel
    head.js("ScriptA.js","ScriptB.js", function(){ "Scripts loaded!"); });



    Tuesday, October 1, 2013 3:36 PM
  • User-425599523 posted

    Thanks,

    1.

    for other Js files, I changed the code at the masterpage

     <script type="text/javascript">
     
         head.js("http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js").js("/js_html/jquery.hoverIntent.minified.js").js("/js_html/jquery.dcmegamenu.1.2.js");
     </script>

    <script type="text/javascript">
        $(document).ready(function ($) {
            $('#mega-menu-tut').dcMegaMenu({
                rowItems: '2',
                speed: 'fast'
            });

            $('.jqzoom').jqzoom({
                zoomType: 'standard',
                lens: true,
                preloadImages: false,
                alwaysOn: false
            });


        });
    </script>    

    But it the above code/js files are not working and I have downloaded the head.js file in the root

    2. So what I do whereever I have Ajax toolkit in aspx?

    3. AjaxControlToolkit.dll in the bin directory is 6.2 MB is something wrong?

    Wednesday, October 2, 2013 3:09 AM
  • User281315223 posted

    I suppose that you could try moving your document-ready block inside your head.js call, which should ensure that all of the previous files have been loaded before calling the rest of your jQuery scripts : 

    <script type="text/javascript">
        head.js("http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js").js("/js_html/jquery.hoverIntent.minified.js").js("/js_html/jquery.dcmegamenu.1.2.js", function(){
            $('#mega-menu-tut').dcMegaMenu({
                rowItems: '2',
                speed: 'fast'
            });
    
            $('.jqzoom').jqzoom({
                zoomType: 'standard',
                lens: true,
                preloadImages: false,
                alwaysOn: false
            });
        });
    </script>
    

    I'm not sure if you are going to be able to use deferred loading for the AJAX Control Toolkit controls simply because each of the individual controls is going to generate its own Javascript and events for the controls themselves (and since you don't actually write this code, you may not be able to defer it).

    What does PageSpeed Insights cite as the reason that your score drops after including the Toolkit?

    Wednesday, October 2, 2013 8:17 AM
  • User-718146471 posted

    I personally haven't used it with something like the AjaxControlToolkit previously (I always used it to help speed up external JS files like jQuery or other dependencies).

    That's fine Rion, I figure I can strip out the .js files inside the ajax toolkit and then reference them like you show above. This way, Ajax will only load what we are actually using and not a bunch of controls we don't need.

    Wednesday, October 2, 2013 11:24 AM
  • User-425599523 posted

    Hi Rion

    I tired the code, still not working! and even i download jquery.min.js

    Wednesday, October 2, 2013 11:35 AM
  • User-425599523 posted

    thanks bbcompent1

    how do i reference .js files for ajaxcontrol tool kit for the controls which i need?

    Wednesday, October 2, 2013 11:36 AM
  • User-718146471 posted

    Here is an article that explains how to get teh .js files out of the toolkit.

    http://www.infinitezest.com/articles/where-are-the-asp-net-ajax-library-javascript-files.aspx 

    Wednesday, October 2, 2013 11:43 AM
  • User281315223 posted

    Are you recieving any errors in particular? Have you tried using the Developer Tools (F12) within your browser and checking the console to see if any errors are present? It's important that the head.js code is place within the <head> section of your page as well and that it is the only Javascript that is referenced within the <head> section.

    Wednesday, October 2, 2013 11:50 AM
  • User-718146471 posted

    For a direct route to getting the source of the ajax kit, go to: http://ajaxcontroltoolkit.codeplex.com/SourceControl/latest#ReadMe.html

     

    Click Download and save the zip file. Extract and open the project. You will find the JS files in the project.

    Wednesday, October 2, 2013 11:55 AM
  • User555306248 posted

    To improve the performance of ASP.NET AJAX and AJAX Control Toolkit, I would like to suggest you try to read the following article:   ASP.NET AJAX Performance Improvement http://lancezhang.wordpress.com/2008/11/15/aspnet-ajax-performance/

    http://forums.asp.net/t/1507992.aspx

    Thursday, October 3, 2013 12:30 AM
  • User-425599523 posted

    Hi

    unfortunately im thinking to remove Ajax control toolkit from my project, because of performance and site pagesight ranking is low.

    any alternatives to move to jquery

    i have used heavily

    the hovermenuextender,BalloonPopupExtender, AlwaysVisibleControlExtender& AutoCompleteExtender and thinking to replace someother jquery controls..

    Request you to share the ideas.. thanks

    Saturday, October 5, 2013 6:29 AM
  • User281315223 posted

    As I mentioned earlier bsarahim, don't rely too heavily on your PageSight ranking and certainly don't remove areas of your application to reduce it further just to get an arbitrary score from 87 to the mid-90s. 87 is a very respectable score for Google's PageSpeed Insights and you really aren't going to notice any major performance increases from moving it much higher than 87.

    Obviously, you could use jQuery and some of its available libraries and plug-ins, but this could put you in the same situation and you may find that you would need to reference additional libraries in there which could affect your PageSpeed score even further. If you have followed the major suggestions provided by PageSpeed insights, you should be in great shape and your site should perform as well as expected.

    I'll provide a few additional resources that I commonly recommend checking out when it comes to improving performance within ASP.NET Applications.

    The Web Developer Checklist

    If you want an excellent resource that encompasses a variety of methods to improve your website or web application, I cannot recommend the Web Developer Checklist enough.

    It features tools and resources that can help you analyze several aspects of your site including : 

    • Best Practices (ensuring that your markup is in good condition and features like spell-checking)
    • Mobile Analysis (checking that your site works well on Mobile devices)
    • Analytics Checking (tools for uptime monitoring and traffic analysis)
    • Performance (including Google PageSpeed Insights, Yahoo's YSlow and tips to optimize your sites Headers and Images)
    • Usability (tools to check HTML5 compliance , Search-friendly URLs and more)
    • Accessibility (ensuring your site can be accessed using screen readers and has appropriate contrast levels)
    • SEO (tools to analyze how accessible and readable your site is for Search Engine crawlers and more)
    • Code Quality (CSS, Javascript and HTML validation tools)
    • Semantics (checking for additional data within your site)
    • Security (checks for best practices for securing your site and preventing nasty things like XSS)
    • Social Media (checks if your site is properly connected up with social media sites like Twitter and Facebook)

    There is also an ASP.NET-specific version available on the site as well and one that focuses specifically on ASP.NET Performance. It's probably one of the best single resources that I have found for improving nearly all aspects of a website or web application.

    Consider YSlow 

    Another "PageSpeed" analyzer that you might want to consider looking into as well (that isn't nearly as stringent as Google PageSpeed) is Yahoo's YSlow Analyzer, which is very similar to Google's PageInsights and has different settings depending on the size of your site and application.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, October 5, 2013 8:07 AM