Skip to content
Garrett LeSage edited this page Nov 26, 2018 · 3 revisions

Performance Q & A

Is Cockpit slow?

Yes.

Some parts of Cockpit are especially slow, such as logs, services, storage, etc.

Is Cockpit being slow a problem for end users?

Yes, it was mentioned several different times in various usability studies.

Some of the speed issues are due to Cockpit providing no feedback that things will take a while, others are because Cockpit takes a very long time to actually load a page or perform a task.

Most of the speed issues are related to page load times.

How important is it to address Cockpit's slowness?

It's important, but be can do it in tandem with other work.

Sometimes being consious during development is enough. For existing pages, we'll need to retrofit them with various techniquest to improve speed (both actual and percieved).

What can we do?

Improve feeling of speed, including:

  • Progress indicators
  • Progressive loading (page structure loads in, with placeholders; actual data is swapped in)
  • Ensure all fonts are loaded on page load (instead of pulled in when needed), to prevent text flashing
  • Add transitions and animations

Improve actual performance

  • Identify and fix bottlenecks
  • Try to load & display data async instead of sync
  • Split data retrieval into chunks
  • Cache and pre-cache (start loading services, logs, network card info, storage info, packages that need updating, etc. directly after the overview page loads)
  • Don't duplicate CSS & JavaScript per page — have a base library that's re-used, but not recompiled into everything
  • Limit # of assets to load (bundle when possible) — this should be balanced with the above
  • Move per-page custom widgets upstream to Cockpit, where they can be shared (JS, HTML, CSS)

Measure

  • Including page load performance in tests
  • Compare metrics to previous metrics on the same hardware (relative gains / losses)
  • Test on a "typical" system and ensure various thresholds are met
  • Set targets for number of assets, file size (HTML, JS, CSS, compelte), speed until first paint, speed until page is completely loaded

How fast is "fast"?

From Nielsen Norman Group on Website Response Times on response time limits:

  • 0.1 second is "instantaneous"
  • 1 second is "seamless"
  • 10 seconds is upper-bounds slow (way way way too slow)

From Performance is UX:

  • 300ms max for interactions — anything above this threshold needs a spinner or other progress indicator
  • 2 seconds max for a page load

Why is speed important?

  • High load
  • Network issues (VPN, remote, cell phone networks)
  • Low-powered systems
  • Mobile devices

File bugs

As this will be an ongoing effort, we should probably have a performance tag for issues.

Resources

Clone this wiki locally