---
title: Making PortPilot feel instant
description: One timer, one snapshot, secrets in the keychain, no login. Fast is also what we refuse to build.
date: 2026-08-22
slug: making-portpilot-fast
topic: Desktop
series: PortPilot
seriesOrder: 4
tags:
  - portpilot
  - performance
---

Fast here means: you hit the shortcut, the list is already true, kill feels immediate, search does not hitch.

## One watcher

The port table is a snapshot on a timer, not a scan on every mouse move. The UI keeps the last snapshot and paints when something actually changed.

```ts:port-watch.ts
function startPortWatch(push: (rows: PortRow[]) => void) {
  const tick = async () => push(await window.portpilot.listPorts())
  void tick()
  const timer = setInterval(() => void tick(), 1500)
  return () => clearInterval(timer)
}
```

~1.5s is a default. Faster feels busy. Slower feels stale. **One watcher**, not a watcher per row.

<LabeledFlow
  caption="The renderer never shells out. It only receives a list."
  steps={[
    { label: 'Timer', hint: '~1.5s' },
    { label: 'Main', hint: 'Ask the OS' },
    { label: 'Store', hint: 'Zustand' },
    { label: 'Table', hint: 'Rows that changed' },
  ]}
/>

`Cmd + K` runs Fuse over that in-memory list. No disk crawl. Clipboard keeps **snippets**, not whole files you copied by accident.

```mermaid:os-to-table
flowchart LR
  OS[Operating system]
  Main[Main process]
  Store[Zustand store]
  UI[React table]
  OS --> Main --> Store --> UI
```

## Secrets and first screen

Database passwords go to the OS keychain when you save them. Uncheck save and they live in RAM for the session — not in a JSON file next to `package.json`.

Cold start always opens Ports. Inside a module, the last sub-screen is restored, so JSON → Postgres is not a reset.

<Note>
GitHub updates can send a small patch. Ignore `.blockmap` in Releases — it is not an installer.
</Note>

## What we did not build

No account. No “sync ports to our servers.” No round trip before the list shows. The fastest request is the one you never make.

<Warning>
A desktop app that phones home “for analytics” can still feel slow, and it changes the trust story. The list is local because the ports are local.
</Warning>

Last: how this differs from Activity Monitor plus five other apps, and how you install it.
