Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Performance Optimization in Drupal 8

7,519 views

Published on

In this presentation, Neera Prajapati of Valuebound has discussed on performance optimization in Drupal 8. She has also talked about a range of topics like why website loading time matters? Importance of web performance and how to boost it? and others.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Performance Optimization in Drupal 8

  1. 1. Neera Prajapati https://www.drupal.org/u/neeraprajapati Performance Optimization in Drupal 8
  2. 2. ● What is Web performance. ● What is performance optimization. ● Why Website Loading Speed Matters. ● How to boost site performance. ● How can we test website speed. Agenda
  3. 3. What is web performance Web performance refers to the speed in which web pages are downloaded and displayed on the user's web browser. Web performance optimization, or website optimization is the field of knowledge about increasing web performance. Website performance is a hugely important topic,so big companies of the Web are obsessed with it. For the Googles, Yahoos, Amazons and eBays.
  4. 4. What is performance optimization When we modify a website specifically to increase the loading speed, this is what’s called performance optimization. Web pages and websites are getting bigger and becoming more complex every day. But when a website does not load quickly, it affects visitor’s behavior, which leads to decreases site revenue.
  5. 5. Why Website Loading Speed Matters ● User Satisfaction: It simply means, If your site loading time is high, it directly affects the satisfaction or the dissatisfaction levels of your visitors. They generally expect a fast and reliable online user experience and if the website is unable to deliver on their expectation, they will abandon it. ● Improved Search Rankings: Google’s algorithm uses a multiple factors to determine how to rank search engine results and loading time is one of the important factor of them.
  6. 6. Why Website Loading Speed Matters… Cont. ● Mobile Users: In today’s era most of the people use mobile for web surfing rather than using desktop or laptop so loading time for mobile users is an important factor. Main reason for that, they are used to have slower internet speed.
  7. 7. How important is web performance in Drupal 8 sites Drupal 8 is a powerful and versatile content management system then Drupal 7. However, that power can come with drawbacks, including the speed of your site. Whenever you load a Drupal page, there is a lot going on behind the scenes, involving your database, PHP, CSS, Javascript and more.
  8. 8. How to boost performance In Drupal, there are specific tools and modules are available to optimize the site speed just you need to know them and use. Caching is a very popular technique for optimization that significantly affect the performance.
  9. 9. Cache roles in web performance Caching is a significant part of site performance improvement. It is broad term refers to the process that store data in some accessible space so that can be retrieved easily (a platform where we can store the data and fetch and display it easily). As we know there are different types of caching as it relates to website, namely Client side caching and Server side caching Except these two methods system and pages can be cached in the database, drupal primarily cached information within its database.
  10. 10. Use anonymous user caching: Drupal 8 enables caching by default for anonymous visitors. That is sufficient for small to medium sized websites with moderate traffic. You can select the maximum age for your page caching based on how quickly your website content changes. Use external caching techniques: For better result you can use APC, Varnish, Memcache, and Caching Beyond Drupal Core. Each plays its own specific role, and requires its own configuration settings to be reviewed by the site administrator but make sure it is properly configured.
  11. 11. ● Disable unnecessary module ● Update contributed and core modules ● Use devel module for query analysis ● Use XHprof module for php profiling : XHProf is a utility for profiling PHP. It reports function-level call counts and it’s execution time. Specific tools and modules
  12. 12. ● Use fast_404 module: HTTP 404 Not Found Errors are expensive. They cause performance and usability problems. The Fast 404 Module lets Drupal sites deal with these bad page requests quickly and efficiently, reducing the chance that 404s will cause slowdowns or crashes. ● Aggregate/compress css and js file. ● Optimize image.
  13. 13. ● Use CDN(content delivery network): If your site has large amounts of content to display, consider using a content delivery network (CDN). Most CDNs are used to host static resources such as images, videos, audio clips, CSS files and JavaScript. The closer a CDN server is to a site visitor, the faster the content will be delivered to the visitor’s computer or mobile device. CDNs help improve global availability and reduce bandwidth. It stores a cached version of its content in multiple geographical locations. Ex: AWS Cloudfront, Akamai ● Use lazyload module for images on websites.
  14. 14. ● Remove multiple redirection and of a page. ● Use css sprite for small images combine into one or serve it from glyphicon ● Use gzip compression: GZIP provides a lossless compression, that is, we can recover the original data when decompressing it. It is based on the DEFLATE algorithm.
  15. 15. ● Logging: disable database logging and set slow query log and set long query time. ● For any new custom database table apply indexing for search the data. ● Do not use count(*) in count query instead use count(any field) Few database related points that we can't ignore
  16. 16. Choose a host that can offer greater speed If, after implementing some of the tips above, you are still not meeting your performance goals, you should consider choosing a faster host. When you look for hosting, you’ll find many options. Managed Dedicated Server(s): A managed dedicated server takes care of all your hosting needs for you. Not only do you get the hardware but you get a team of experts to make sure everything is running as it should. They will keep your software up-to-date and alert you if there are any problems. You can deploy multiple servers in many configurations
  17. 17. Dedicated Server(s): A dedicated server provides low latency which means a fast response time for most small to medium-sized sites. Cloud Hosting: Cloud hosting is scalable. The “cloud” means that there is a data center with lots of dormant servers. As your site’s needs scale up (or down) the servers in the data center respond with more server power. Examples: Acquia Cloud, Pantheon, and Platform.sh.
  18. 18. How can we test web performance There are many free desktop tools and as well as online sites available. you can use to test and improve your site performance accordingly. Here are just a few that you can try: Desktoptools: ApacheBench (ab), Apache jmeter, The Grinder For more you can visit EasyQA, a test management tool. Online sites: Pingdom, GTMetrix, YSlow,PageSpeed Insights ,Web Page Analyzer,Load Impact etc.
  19. 19. THANKS! QUESTIONS?

×