Commit9cffdad1Recorded21 Jul 2026Repositorylantern

Release 0.1.3: idle-CPU fix via an event-driven run loop

Message

The run loop blocks on the GMainContext poll descriptors through the scheduler's await-readable-fds instead of spinning polling timers, so an idle Lantern app drops from ~44% of a core to ~8% in a Slate desktop build, with no change to responsiveness. Relocked to sigil 0.17.18 (which adds await-readable-fds).

Changed
 RELEASES.md |  9 +++++++++
 package.sgl |  2 +-
 sigil.lock  | 12 ++++++------
 3 files changed, 16 insertions(+), 7 deletions(-)
Diff
RELEASES.mdmodified
@@ -17,6 +17,15 @@ slug: releases
17
# Lantern Releases
18
19
+20
## 0.1.3
+21
+22
A big idle-CPU cut for every Lantern desktop app. The run loop no longer polls on a timer while nothing is happening: it blocks on the windowing system's own event descriptors and wakes only when there is real work, so an idle app costs a fraction of what it used to. Existing projects build without changes.
+23
+24
### The event loop sleeps when idle
+25
+26
Lantern's run loop previously spun several polling timers (a 5ms bridge drain, a periodic quit watcher, a short main-wait) that kept the scheduler perpetually awake, so even a completely idle window burned close to half a CPU core. The loop now does one blocking GLib iteration, sleeping on the GMainContext poll descriptors via the scheduler's `await-readable-fds` and draining the page bridge in the same wake, so it consumes almost nothing when the app is idle. In a Slate desktop build this dropped the Lantern process from about 44% of a core at idle to roughly 8%, with no change to responsiveness: the bridge still delivers a message the same iteration it arrives. Requires sigil 0.17.18 for `await-readable-fds`.
+27
+28
29
## 0.1.2
30
31
A control release for apps that own their own shutdown and run work in the background. An app can now quit itself or intercept the window close button from the page, and declare background services that run alongside the UI for the life of the app. Existing projects build without changes.
package.sglmodified
@@ -14,7 +14,7 @@
14
15
(workspace
16
name: "lantern"
17
version: "0.1.2"
+17
version: "0.1.3"
18
description: "A Sigil-native desktop wrapper for web apps"
19
url: "https://codeberg.org/sigil/lantern"
20
license: "BSD-3-Clause"
sigil.lockmodified
@@ -3,9 +3,9 @@
3
(package name: "sigil-stdlib"
4
url: "codeberg:sigil/sigil"
5
ref: "^0.17.14"
6
sha: "8e694ed5cde7d6a9f1c935ee21ab8a3a9bb92f4f"
+6
sha: "0bb453df886bbbdc7fff829f71ec2848b4b947f0"
7
package-selector: "sigil-stdlib"
8
version: "0.17.16")
+8
version: "0.17.18")
9
(package name: "sigil-ffi"
10
url: "codeberg:sigil/sigil-ffi"
11
ref: "^0.16.3"
@@ -19,15 +19,15 @@
19
(package name: "sigil-test"
20
url: "codeberg:sigil/sigil"
21
ref: "^0.17"
22
sha: "8e694ed5cde7d6a9f1c935ee21ab8a3a9bb92f4f"
+22
sha: "0bb453df886bbbdc7fff829f71ec2848b4b947f0"
23
package-selector: "sigil-test"
24
version: "0.17.16")
+24
version: "0.17.18")
25
(package name: "sigil-test-runner"
26
url: "codeberg:sigil/sigil"
27
ref: "^0.17"
28
sha: "8e694ed5cde7d6a9f1c935ee21ab8a3a9bb92f4f"
+28
sha: "0bb453df886bbbdc7fff829f71ec2848b4b947f0"
29
package-selector: "sigil-test-runner"
30
version: "0.17.16")
+30
version: "0.17.18")
31
(package name: "sigil-system"
32
url: "codeberg:sigil/sigil-system"
33
ref: "^0.1"