Switching pages in the panel is now 4x faster
The panel now starts loading a page before you click it. Here's what changed, and the numbers from the old and the new build.
Billing now opens 8.7 times faster: 416 ms to 48 ms when you click it from your server list. That's the biggest jump from today's work on making the panel quicker to move around in, but everything else moved too. With a mouse, going from one page of your server to another now takes about 50 ms, where it took about 210 ms this morning. Across the six page switches I timed, the median is 4.2 times faster.
How I measured it
I took two builds of the panel: the one we ran this morning, and the one with today's changes. Both ran on the same machine, against the same test copy of the panel. Every request in it was slowed down to match production. I looked up how long each request takes on our live server (the median from our logs, 18 to 51 ms) and added a 50 ms round trip on top, which is about what you get in Europe. The console's connection to the node took four round trips to open.
Then a script clicked through a server ten times on each build, taking turns between them. The timer starts when the click lands and stops when the new page's own content is on screen, nothing on it is still loading, and any animation between pages has finished. The mouse rests on each link for 150 ms and holds the button for 80 ms, like a person does. These are the medians:
| Click | Before | After | Faster |
|---|---|---|---|
| Console → Files | 211 ms | 63 ms | 3.3x |
| Files → Settings | 210 ms | 47 ms | 4.5x |
| Settings → Backups | 216 ms | 48 ms | 4.5x |
| Console → your server list | 222 ms | 63 ms | 3.5x |
| Your server list → Billing | 416 ms | 48 ms | 8.7x |
| Billing → your server list | 190 ms | 49 ms | 3.9x |
The ranges don't overlap. For every switch, the slowest of the ten new runs was faster than the fastest of the ten old ones.
What changed
Pages load before you click. Most of a page switch used to be waiting: first for the page's code, then for its data. Neither depends on the click itself. Now, when your mouse rests on a link for 50 ms, or you focus it with the keyboard, or you press it down, the panel fetches that page's code and its first requests. By the time you let go of the button, they're usually there.
No more half-drawn pages. If a page isn't quite ready when you click, the panel now keeps the old page up for up to 160 ms and then shows the new one complete, instead of a skeleton that fills in. I also took out the fade between pages. It looked smooth, but it delayed every switch by a couple of frames and then spent another 100 ms fading.
Pages remember what they showed. Going back to a page you've seen shows what it had last time straight away, then quietly checks for anything new. The clearest case is your server list: every server used to say "Loading…" for a moment each time you came back to it.
Two bugs. Billing (and one of our staff pages) waited about 300 ms before asking for anything. That wait is meant for the search box, so the panel doesn't search on every key you type, but it also ran on the first load. That's most of Billing's 8.7x. And hovering a server on your list already fetched its details, but the answer was thrown away as soon as it arrived, so the click fetched them again.
The console connects before you get there
Opening a server is a bit different, because the console needs its own connection to the machine your server runs on, and opening one takes several round trips. So when you rest on a server in your list, the panel now opens that connection and signs in right away. The console takes it over when it appears and replays what arrived in the meantime. There's only ever one of these waiting, and it closes after 15 seconds if you don't click.

From the click until the console shows its log went from 679 ms to 310 ms, 2.2 times faster. The spinner also waits now: it only appears if connecting takes longer than 300 ms, so a quick connection doesn't flash one at you.
What didn't get faster
Most of this works by using the moment between pointing at something and clicking it. If you don't leave that moment, for example when you click the instant your mouse arrives or use the keyboard, there's less time to get ahead. The same clicks without the 150 ms rest and the 80 ms press:
| Click | Before | After | Faster |
|---|---|---|---|
| Console → Files | 213 ms | 61 ms | 3.5x |
| Files → Settings | 198 ms | 96 ms | 2.1x |
| Settings → Backups | 208 ms | 109 ms | 1.9x |
| Console → your server list | 211 ms | 61 ms | 3.5x |
| Your server list → Billing | 422 ms | 96 ms | 4.4x |
| Billing → your server list | 198 ms | 47 ms | 4.2x |
That's 1.9 to 4.4 times faster, 3.5 in the middle. Opening a server until its console is live goes from 612 to 465 ms, which is only 1.3 times faster.
Opening the panel itself hasn't changed. The first load of your server list took 586 ms before and 589 ms now, and a console opened straight from its address took 883 ms before and 865 ms now. That's the next thing I want to work on.
If something in the panel still feels slow to you, tell me on Discord which page and what you clicked.