circagraph
Sign inSign up

openchronology/timeline-app on GitHub

The OpenChronology repository on GitHub, mirrored by och-import-github: issues and pull requests as durations (ongoing while open), what happened to them as moments, plus releases, milestones, commits and branches. The Branches view shows the most recently active branches each in a track of its own.

Source: https://github.com/openchronology/timeline-app

3,131 moments · 2026-10-05 CE 20:21:49 UTC – 2026-11-16 CE 12:10:45 UTC · by @athan · @athan

#215 Switching a new event to Duration is slow: the tabs swap two modal dialogs

–

  • github
  • github/openchronology/timeline-app
  • github/openchronology/timeline-app#215
  • issue
  • state:closed

Since #209 (PR #211), choosing the **Duration** tab of a new event is about 2–3× slower than the old **+ Duration**. In CI's browser UI benchmark (`new-duration`, 1,000 moments) it went from about 19 ms to 43–58 ms unthrottled, and from about 50 ms to 105–153 ms at 4× CPU throttling. PR #214's run reached 153 ms, over the 150 ms budget, and failed the gate. ## Why The tabs switch between two ` ` elements: they close the moment dialog and `showModal()` the duration dialog. A Chrome CPU profile of the switch (1,000 moments, 4× throttling) shows the cost per switch: - about 58 ms in `showModal` and 57 ms in `close`: changing which dialog is modal makes the browser recompute styles for the whole page; - a redraw of the timeline, which the moment dialog's close handler requests. The old + Duration paid for one `showModal`. Switching tabs pays for a `close` and a `showModal`. ## Fix Make the event dialog one ` `, as #209 first proposed. The duration form becomes a panel in it beside the moment form. Switching tabs shows one panel and hides the other, so nothing modal changes. A duration opened from a moment's details currently opens on top of it; closing it returns to the moment. With one dialog, the duration panel replaces the moment panel, and closing the duration (×, Cancel, Save, Escape or a backdrop click) shows the moment panel again. https://github.com/openchronology/timeline-app/issues/215

Related

Open #215 Switching a new event to Duration is slow: the tabs swap two modal dialogs in the timeline

#215 Switching a new event to Duration is slow: the tabs…