Can I use caching to store heavy page - asp.net

I am currently working on a very heavy web page(2.1 MB). As my clients are going to access the page inside an Intranet, its loading speed is fine. But I want to make it faster than this. Will caching a page of 2.1 MB help me?

Just try it and see.
Actually, page caching will help performance, but do you really need to generate the page that big? You are likely loading way more data than each user will be using on each page load. Figure out how to split it up so it runs faster and consequentially likely more usefull for your users.

It depends on where the 2.1MB is coming from, and how long it takes pages to be generated in addition to their file weight. Caching would probably help page load time by cutting down query/script execution. Most images, JavaScript, etc. should be cached by the browser after first load.
If you've not already, try using Yahoo's YSlow to identify ways of improving overall speed.

Rarely.
The slow part of most web transactions is the desktop.
2.1M takes time to download. If the desktop bandwidth is tied up with eBay and Facebook updates, your page will be slow.

Related

First Byte Time scores F

I recently purchased a new theme and installed wordpress on my GoDaddy hosting account for my portfolio. I am still working on it, but as of right now I sometimes get page load speeds of 10-20seconds, and others 2 seconds (usually after the page has been cached). I have done all that I believe I can (without breaking the site) to optimize my performance speed (reducing image sizing, using a free CDN, using W3 Total Cache, etc).
It seems that my main issue is this 'TTFB' wait time I get whenever I go to a new page that hasn't been cached yet. How I can fix this? Is it the theme's fault? Do I NEED to switch hosting providers? I really don't want to go through the hassle of doing that and paying So much more just to have less than optimal results. I am new to this.
My testing site:
http://test.ninamariephotography.com/
See my Web Page Results here:
http://www.webpagetest.org/result/161111_9W_WF0/
Thank you in advance to anyone for your help:)
Time To First Byte should depend on geography. I don't think that's your problem. I reran your test and got a B.
I think the issue is your hosting is a tiny shared instance, and you're serving static files. Here are some ideas to speed things up.
Serve images using an image-serving service. Check out imgix which is $3/m. It could help in unexpected ways serving images off an external domain depending on HTTP protocol version and browser version, and how connections are shared.
Try lossy compression. You lose some image detail, but you also lose some file size. Check out compressor.io for an easy tool.
Concatenate and minify scripts. You have a number of little javascript files that load individually. Consider joining them together and minifying. I don't know the tool chain for Wordpress, perhaps there's a setting?
If none of that helps, you should experiment with different a hosting choice.

Huge loading time on some pages

Here is my page URL: www.1800-gifts.com/USA/Cake-Delivery and other pages like that all are loading very slow even i have caching , compression enabled, i have tried to call go daddy which is my hosting provider but they do not respond positive.
Developer is telling me that it is a server issue, but i don't find any issues in server it is fine.
This website is developed in asp.net 4.0, database is mssql 2012 r2.
server is VPS, with 2 gb of ram, I have 2 GB data in database, and some table contains more than 100k records.
Please look at my site and give me suggestions, i have checked in google page speed and other tools they are all saying different views.
I am not sure if this is the cause but if you enable developer mode (F12) and run the site in chrome you will see that the cake-delivery page is the one that is causing the loading time (44s). You will also notice that there are JQuery errors on the page.
This could possibly be part of the problem.
EDIT:
After looking at the linked page I think Erik is right, JQuery is not the issue.
The person that is developing the site needs to revisit the way the page works completely. There is a massive amount of operations happening in the page load of the page. The operations that are used are also hack and slash ways of doing things that there is already built in methods for. This is simply a page taking forever to load due to bad coding.
I would suggest the developer returns to the drawing board.
There are a lot of great tools that look at your page and tell you what might be wrong with it. Analyzing your page with GTmetrix for example gives you this. There are also important tips you can work on right away, for example:
gzip compression
Minifying css, html and js
Concatenating scripts
and a lot more. I also recently wrote an article showing important optimization for web performance
Looking at the waterfall chart of your page (also available on GTmetrix) shows that the biggest problem is indeed your server. It takes 16 seconds to receive an answer for the first request (time-to-first-byte). There is clearly something wrong!
There are a lot of things that could be wrong on your server. You should test your database queries (are they slow? How many are performed for a page load?).

Priming the asp.net output cache

Is there a way to programmatically prime the asp.net output cache? I've investigated the caching API and can't seem to find an obvious way to do this. Has anyone tried something like this? If so, what method did you use?
I gave some thought to this last year and ended up concluding that it was not that important for the case, but if it's important for you website, all you have to do is to simply call the webpages from somewhere like Application_Start (after all code has run) event but you shouldn't stop there!
The cache will eventually expire and to avoid that you should set up some way to cache the pages again before any clients requests that page.
Make the outputcache dependent on someother object in cache and set an expiration callback.
Thus, when that cache object expires, so does your pages and you should make http requests to the pages you want to recache and so on.
I'm answering to this question, but the amount of effort and question marks I still have in my mind lead me to advise not to go through with this...
UPDATE
The only kind of dependency you may set in outputcache is sql dependency. Use it if you want, but if you would need to depend your outputcache on some other business object, then this might get very difficult. I could tell you that you could set a database object and depend your database on it and expire it yourself using some kind of timer.
Man, the longer I write the more solutions and difficulties I find! I can't write a book for something that is not worthy your precious time. Believe me you that the usefulness for this will be nearly zero.
Priming the cache is as others have suggested as easy as requesting the pages you want cached. Of course if you do this programmaticly it will only request the HTML and not all the linked resources (CSS, JavaScript, Images...) which is a good thing to avoid wasted bandwidth.
For many websites the items that are cached which consume the biggest performance penalties are common to many or all pages. For example a navigation system on a large CMS or storefront may query the database and do a bunch of rendering work which can then be cached for all pages. Also a big part of the initial load in ASP.net is when the website if first accessed and loaded into memory. Both of these issues can be addressed by even calling a single page on your site, but there is nothing stopping you from making a list of URLs and calling each one periodically.
If your cache policy is set for a 20 minutes timeout, maybe request each page once every 17-18 minutes.
Here are some resources with source code to help you get started:
Good Simple Primer on requesting web URL in C#
Website Monitoring Windows Service
Asyncronous Website Monitor
As I mentioned before, you can easily extend these to "foreach" over an array or list of URLs to be requested.

Quickiest way to determine why a site is sluggish?

I just picked up a client who's Wordpress web site takes anywhere between 8 to 22 seconds to START loading. The loading delay also occurs when using the Wordpress backend so I'd like to fix the loading issue first before starting my work (template re-design). What's the quickest yet efficient way to determine why this Wordpress site is taking so long to start loading?
Thanks in advance
P.S. - They currently have a caching plugin installed (WP Super Cache) which I assume the previous web developer installed to help with the loading issue but it only helps with the front-end and not the back-end.
Try to run some test like YSlow and Google Page Speed and read their results and suggestions.
Google Speed Online is helping me a lot with analysis of my websites.
http://pagespeed.googlelabs.com/
I use browsermob. They use real browsers to test the site load performance. Shows very nice graphs showing how long each and every request took. Also shows how many requests happen in parallel. As they use real browser, you can see how long it will take to load on a real browser. Then you can choose from which location you want to test. You can choose a UK location to test how fast your page loads from UK.
By the way, I am in no way related to browsermob. I just happen to be a satisfied user of this.
And it is free.
Your server is probably loading far too many modules and is thrashing the disks as it's run out of memory.
You need to both reduce how much memory each PHP instance consumes and limit how many PHP instances can run simultanouesly to ensure you don't use virtual memory for your PHP instances.
I've written a detailed answer to a very similar problem here on Stack Overflow:
How can I figure out why my Wordpress pages load so slowly?
Well, i have came across a similar situation, such things happen when your website is hosted on a GridHosting server, which means it changes according to the server load, but sometimes the things are just opposite the scenario, the best way to check why it is slow is to first ping the website at random interval , so in this way you will know if the distance is the cause or the packet dropping is the issue, secondly, you need to make sure your server's configurations is good, i.e; request your host about a RAW log of your website, in this way you can know what is it taking long for your server to response, and the least best method is to check and make sure that your DNS resolves in a good time, and try to use some free CDN services like CloudFlare.
Hope this helps.

Very large drupal page execution time

I'm on VPS hosting with dreamhost and am experiencing very high page load times. Here is the output from Devel module for mysql queries.
Executed 190 queries in 227.67 milliseconds. Page execution time was 21969.43 ms.
Using the module profiling at http://2bits.com/articles/measuring-memory-consumption-by-drupal-bootstrap-and-modules.html it seems ok:
total: 304.15
So if the modules are taking 304ms and the mysql is taking 227ms, where could the other 21 seconds be going?!
Here is the url http://5oup.net
As always any help very much appreciated!
James
You are not compressing your JavaScript of CCS files, it shouldn't be the cause to such a slow page load. It seems that you have your site setup for development mode, which is quite ineffective for a production site.
I tried browsing around, and I didn't find any page that was as slow as you describe. But the point above is a major point for performance improvement.
Some ad hoc testing on the home page gives me about 8-12 seconds per request (forced reload to exclude local caching). According to firebug, the biggest waits are due to loading all the images for the rotation, closely followed by the separate and uncompressed css and js files.
With local caching, this goes down to 1-4 seconds, with most of the time being spent on waiting for the server to actually respond with a '304 - not modified' for all the files involved.
So your first goal should be reduction of the number of separate files:
For the js and css files, combining them into single files and turning on compression should already help quite a lot - check your site settings under admin/settings/performance.
For the rotation images, this would require more work, as you would either have to combine them into a sprite or add the logic to only load one with the page itself and pull the additional ones later on via js.
You should try the css/js combination first and see if you really need more tweaking after that.
I found the very high page load on the home page was down to simplexml_load_file(), which for some reason was not enabled on my host.

Resources