◷ openchronology

Timeline size and platforms

A timeline holds at most 200,000 moments (and at most 200,000 durations and 200,000 relationships) on every platform. A self-hosted server can raise or remove that limit for its own timelines with TIMELINE_ENTRY_LIMIT (Timeline size); the offline HTML file and the desktop app's .och files keep it. Within that limit, the platforms differ in how responsive large timelines feel. The data below comes from the capacity benchmarks.

Which platform to use

PlatformComfortableNoticeably slowRecommendation beyond that
Browser on a fast computer (guest editing, offline HTML)up to ~10,000 moments~20,000 moments and more: opening takes over 1.5 s, and edits over 100 ms to showOpen the timeline in the desktop app, or save it to your account and edit it on the platform
Browser on a phone or slower computerup to ~1,000 moments~2,000 moments and more: zooming takes over 150 ms to showEdit on the platform (signed in); there is no desktop app for phones
Desktop app (.och files)up to the 200,000-moment limitOpening takes about a second from ~100,000 moments; views and saves stay fastThe platform for sharing and collaboration, or on a slow computer. It is not faster for one person on a fast machine
Platform (signed in, server timelines)up to the 200,000-moment limit—Split timelines that approach the limit

The comfortable sizes come from the UI benchmarks on GitHub's runners: up to them, every interaction meets its budget.

Why the browser is different: guest editing and the offline HTML file keep the whole timeline in the page. Opening parses and indexes every moment, and every redraw summarizes them in JavaScript. The desktop app and the platform keep timelines in a database and read only what is on screen, so their costs grow far more slowly. Memory is rarely the problem: an open timeline takes about 0.6 KB of browser memory per moment (about 115 MB at 200,000).

Signed-in users who edit a timeline kept only in the browser (imported, and not yet saved to their account) have a draft kept in the browser. Opening such a timeline stores the whole draft once; after that, each change stores only the records it touched, in under 1 ms even at 200,000 moments. The pause after an edit is the redraw.

Advice in the app

The editor suggests another platform when a timeline outgrows the one in use. The advice appears as a notice under the header; it never blocks editing, and dismissing it holds for that timeline.

  • Browser: The notice appears when this device measured the timeline as slow, timing what its user waits for, from an input until its result is painted:

    • opening took more than 1.5 s, until the timeline was painted;
    • zooming, panning and pinching, from 1,000 moments: the median of the last five waits from an input until its view was painted exceeded 150 ms. Below 1,000 moments the time goes on drawing, which every platform does in the browser, so another platform would not be faster;
    • keeping a draft took more than 100 ms after each change (signed in, for a timeline kept only in the browser).

    Once measured slow, the notice stays for that timeline, even if later views are quick (a small pan after slow zooming). Without such measurements it appears from 20,000 moments. It offers Export (to open the file in the desktop app), Save to server or Sign in where the browser is connected to a server, a link to the desktop app, and, in the offline HTML file, a link to the platform.

  • Desktop app: The notice appears when views of the timeline consistently take more than a second on this computer. It suggests saving the timeline to a server.

  • Every platform: The notice appears from 150,000 events (moments or durations) or relationships, since a timeline holds at most 200,000. On a server with a different TIMELINE_ENTRY_LIMIT, the notice appears at three quarters of that limit, and never when the limit is unlimited. It suggests splitting the timeline. On the platform and in the desktop app the count covers moments; in the browser it also covers durations and relationships.

These rules live in src/capacity.ts.

Data

Medians from npm run bench on a 16-core Linux desktop, with Chromium for the browser. "4× slower CPU" throttles Chromium's processor 4×, roughly a mid-range phone.

MomentsBrowser openBrowser open, 4× slower CPUDesktop openPlatform open
1,0000.14 s0.48 s17 ms10 ms
10,0000.70 s2.6 s0.10 s18 ms
50,0003.5 s13 s0.25 s25 ms
100,0008.6 s34 s1.1 s24 ms
200,00021 s81 s1.1 s35 ms
MomentsBrowser redrawBrowser redraw, 4× slower CPUDesktop viewPlatform view
1,00057 ms0.21 s7 ms9 ms
10,0000.14 s0.57 s16 ms18 ms
50,0000.18 s0.70 s23 ms24 ms
100,0000.23 s0.89 s31 ms27 ms
200,0000.21 s1.0 s46 ms36 ms
MomentsPause after an edit (browser)Same, 4× slower CPUOf which draft saveDesktop savePlatform save
1,00033 ms0.15 s0.1 ms2.1 ms3.7 ms
10,00067 ms0.33 s0.2 ms2.3 ms3.7 ms
50,0000.10 s0.43 s0.1 ms2.5 ms3.8 ms
100,0000.15 s0.72 s0.1 ms2.8 ms3.9 ms
200,0000.30 s1.3 s0.2 ms2.6 ms3.8 ms
MomentsBrowser memoryDesktop filePlatform rows
10,0007.3 MB3.3 MB9.0 MB
200,000116 MB68 MB184 MB

Platform rows exclude PostgreSQL's indexes and revision history.

A response within 100 ms feels instant, and a task that takes more than a second loses the user's attention. The browser crosses these lines first:

  • At full speed, a redraw exceeds 100 ms from about 4,000 moments, and opening exceeds a second from about 14,000.
  • With the CPU slowed 4×, a redraw exceeds 100 ms even at 1,000 moments, and opening exceeds a second from about 3,000.

The desktop app opens in about a second at 100,000 moments and more. Its views and saves, and all of the platform's operations, stay well under 100 ms up to the limit.

The Benchmarks workflow reproduces these on GitHub's runners (Actions → Benchmarks), and its report shows them as charts. On a standard GitHub-hosted runner the curves had the same shapes, about 1.3× slower:

MomentsBrowser openSame, 4× slower CPUBrowser redrawDesktop openPlatform open
1,0000.18 s0.73 s70 ms18 ms12 ms
10,0000.95 s4.3 s0.19 s82 ms23 ms
50,0004.4 s22 s0.21 s0.36 s28 ms
100,00010 s47 s0.30 s0.76 s32 ms
200,00024 s116 s0.40 s1.5 s42 ms

There, the browser opens in about a second at 10,000 moments, and in about a second at 1,000 with the CPU slowed. The desktop app opens 200,000 moments in 1.5 s.

This page is docs/capacity.md in the source code, as this server runs it.