1 / 57

Episerver Performance A-Z

Episerver Performance A-Z. Episerver Developer Meetup Stockholm Sep 2018 Linus Ekström – EMVP Epinova. About me. CEO for Epinova Sweden. Previously worked 13 years at Episerver with different roles in product development . Worked last 3.5 years in Episerver partner companies.

sanderst
Download Presentation

Episerver Performance A-Z

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EpiserverPerformance A-Z EpiserverDeveloperMeetup Stockholm Sep 2018 Linus Ekström – EMVP Epinova

  2. About me CEO for Epinova Sweden. Previously worked 13 years at Episerver with different roles in product development. Worked last 3.5 years in Episerver partner companies.

  3. Why talk about web performance? It´s all aboutusability!

  4. Source: https://blog.kissmetrics.com/loading-time/

  5. Bad web performance = bad business “A 1 second delay in page response can result in a 7% reduction in conversions” If an e-commerce site is making $100,000 per day, this could potentially mean a loss of sales of $2.5 million every year. Source: https://blog.kissmetrics.com/loading-time/?wide=1

  6. Average page size is growing Source: https://speedcurve.com/blog/web-performance-page-bloat/

  7. Source: https://speedcurve.com/blog/web-performance-page-bloat/

  8. Desktop vs mobile usage

  9. Server vs Client side performance Add description

  10. Traditional measurements Time To First Byte Page Load

  11. Better measurements! Time to Interactive Hero Rendering Times First Meaningful Paint “Speed Index”

  12. ” The best performance metric for measuring user experience is one that measures how long the user waits before seeing this critical content.” – Tammy Everts @ Speedcurve

  13. Steps to render a page Download the main document. (TTFB) Parse the document and construct the DOM tree. Parse CSS and construct CSSOM tree. Execute JavaScript. Merge DOM and CSSOM into Render Tree. Run layout and paint. https://classroom.udacity.com/courses/ud884

  14. Source: Fast By Default: Modern Loading Best Practices by Addy Osmani (Slide 10).

  15. Technology to help you

  16. What is a CDN? Content Distribution Network. Enables faster download of static content, for instance images and scripts Offloads the web server. Distrubutes content over regions.

  17. CDN Distribution

  18. How a CDN Works

  19. Implementing a CDN – a case study Dropped the time to load a page with 12.5%, from about 8 to 7 seconds. Increased the amount of requests per second to about the double before the server started having issues.

  20. HTTP 1 vs HTTP 2 A browser downloads 6-8 requests in paralell per domain for HTTP 1. If you are using HTTP 2, you can send multiple files on the same connection. There is still a slight overhead for each separate file. Bundling client resources still make sense, but make a few bundles.

  21. HTTP 1 vs HTTP 2 CDNs aresupporting HTTP2 since a fewyears back. MS Azure web appsnow support HTTP 2 - which is what Episerver DXC is using. https://imagekit.io/demo/http2-vs-http1

  22. Image optimization • Mobile devices becoming more and more used. • Having optimized images should be considered a basic NFR. • Image Resizer.

  23. Image optimization – devicesize

  24. Image optimization - Modern file formats Cloudflare support automaticalconversionsinceearly 2017.

  25. How do we address performance?

  26. Where in the process should performance happen? 1/2

  27. Where in the process should performance happen? 2/2

  28. How to address performance

  29. Layers of caching • Browser cache • CDN • Output cache • Data Cache • Database/external • service

  30. Async • Lazy loading of images. • Looking up current stock from an external service. • Non critical scripts, for instancetracking scripts. • Recommended products. • Items in stock. • Stuff not neededdirectly, for instancecontactus form.

  31. Preloading external resources https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content

  32. What about Episerver?

  33. Donut Cache

  34. Burst Cache • Patternthatworkswell for highlytrafficed sites with lots ofcontentchanges. • When a cache item is about to be evicted, a threadfetches new content to be cached and the old cached item is returneduntil a new version is injectedinto the cache.

  35. Episerver gotchas 1/2 Minimize database calls – Use Episervers caching layer. Episerver has support for cache invalidationbetween servers for in-memorycacheditems. Minimize external requests – and always cache the ones that you are doing when possible. (hint: microcaching) Personalization WILL affect performance. Thereare different ways to tacklethis.

  36. Episerver gotchas 2/2 • Avoid frequent querying of the Dynamic Data Store. • Try to keep your content tree well balanced. • Prefer Lists over ContentArea where possible. • Avoid dynamic properties whenpossible (legacy). • Avoid having controllers for blocks when possible. • Use cache for Episerver Find queries.

  37. Single Page Applications Server rendering starting to become a very common pattern for JavaScript frameworks. This pattern makes it much faster to load the initial page, though still enabling the enhanced user experience that a JS-framework can give. I predictthat the viewlayerof MVC willdie over time. Whyhavetwotechnologies for the frontentlayer?

  38. How to measure

  39. Monitoring Tools • Passive Tools – We can use these to manually test performance • Active Tools – We use these to automatically follow performance

  40. Tools – Web Page Test

  41. Tools – Google Lighthouse

  42. Tools - Speedcurve • Automatic tracking using Web Speed Test. • Track performance over time. • Lots of performance measurements to choose from. • Also custom API for custom tracking, for instance checkout flow.

  43. Speedcurve –Performance

  44. Speedcurve - No of Content Requests

More Related