Skip to content

Frontend Performance improvements

Compare
Choose a tag to compare
@onigoetz onigoetz released this 23 Sep 19:36
· 421 commits to master since this release

Highlights

  • Smaller frontend payload
  • Use a better library for the search engine, rewrote the UI with preact
  • Dropped jQuery entirely
  • Removed the inline code blocks feature, drastically reduced the CSS complexity.
  • Changed the code highlight theme
  • Upgrade highlight.js to 9.15.10
  • Fix a small bug in the Vanilla JS side navigation

Performance improvements

The typical Daux page went from 333K to 96.7K. How did we do it ? Let's look at the details.

  1. Lazy load the highlight.js library (~158K)
  2. Lazy load the search index (~30K in Daux's documentation)
  3. We removed jQuery entirely, replaced with vanilla JavaScript, even in search (~32K)
  4. Replaced the Twitter button/iframe with a built in solution, which has the added benefit of more privacy (~20K)

Added to that, we now do the highlight.js rendering on the server side, so if you use fenced code blocks with the language specified in your documentation, we won't load highlight.js at all.