Take the terminal loop that paints only when the tree moved
jolt-native's terminal backend laid out and painted the whole tree every tick, sixty times a second, whether or not anything had changed. An frq conversation sitting idle in a terminal cost most of a core for it, and the several left open around a working day cost one each. Upstream now sets a flag in the five backend operations every reconciler change passes through, and paints when it is set — `tick` already blocks for up to a frame waiting for input, so the loop sleeps there instead of spinning. Measured here on the demo screen, untouched: 134% of a core becomes 7.9%. Nothing on this side changes. The headless screenshot is the same bytes it was, tag for tag, which is the check that says the frames not painted were the frames that would have painted nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
230bbef parent: 2705788 modified
flake.lock +5 -5 | @@ -110,16 +110,16 @@ | ||
| 110 | 110 | "jolt-native": { |
| 111 | 111 | "flake": false, |
| 112 | 112 | "locked": { |
| 113 | - "lastModified": 1788424155, | |
| 114 | - "narHash": "sha256-Nhs7PyighRRT8DSha1UUrOjl5IZ2wkNMGM1ihFiwHsc=", | |
| 113 | + "lastModified": 1788464616, | |
| 114 | + "narHash": "sha256-MvLa9/ipW3phQjBu+f1vNyzZtyFCvfwOeqKWxuw+lTg=", | |
| 115 | 115 | "ref": "refs/heads/main", |
| 116 | - "rev": "c2d912f670b7a2e5808970d17cecf51c6c87cfbf", | |
| 117 | - "revCount": 41, | |
| 116 | + "rev": "384390d0e216cb6f0e9be8e597b9d16e7a64bb29", | |
| 117 | + "revCount": 42, | |
| 118 | 118 | "type": "git", |
| 119 | 119 | "url": "https://gitlab.com/nandithebull/jolt-native" |
| 120 | 120 | }, |
| 121 | 121 | "original": { |
| 122 | - "rev": "c2d912f670b7a2e5808970d17cecf51c6c87cfbf", | |
| 122 | + "rev": "384390d0e216cb6f0e9be8e597b9d16e7a64bb29", | |
| 123 | 123 | "type": "git", |
| 124 | 124 | "url": "https://gitlab.com/nandithebull/jolt-native" |
| 125 | 125 | } |
| @@ -110,16 +110,16 @@ | |||
| 110 | "jolt-native": { | 110 | "jolt-native": { |
| 111 | "flake": false, | 111 | "flake": false, |
| 112 | "locked": { | 112 | "locked": { |
| 113 | - "lastModified": 1788424155, | 113 | + "lastModified": 1788464616, |
| 114 | - "narHash": "sha256-Nhs7PyighRRT8DSha1UUrOjl5IZ2wkNMGM1ihFiwHsc=", | 114 | + "narHash": "sha256-MvLa9/ipW3phQjBu+f1vNyzZtyFCvfwOeqKWxuw+lTg=", |
| 115 | "ref": "refs/heads/main", | 115 | "ref": "refs/heads/main", |
| 116 | - "rev": "c2d912f670b7a2e5808970d17cecf51c6c87cfbf", | 116 | + "rev": "384390d0e216cb6f0e9be8e597b9d16e7a64bb29", |
| 117 | - "revCount": 41, | 117 | + "revCount": 42, |
| 118 | "type": "git", | 118 | "type": "git", |
| 119 | "url": "https://gitlab.com/nandithebull/jolt-native" | 119 | "url": "https://gitlab.com/nandithebull/jolt-native" |
| 120 | }, | 120 | }, |
| 121 | "original": { | 121 | "original": { |
| 122 | - "rev": "c2d912f670b7a2e5808970d17cecf51c6c87cfbf", | 122 | + "rev": "384390d0e216cb6f0e9be8e597b9d16e7a64bb29", |
| 123 | "type": "git", | 123 | "type": "git", |
| 124 | "url": "https://gitlab.com/nandithebull/jolt-native" | 124 | "url": "https://gitlab.com/nandithebull/jolt-native" |
| 125 | } | 125 | } |
modified
flake.nix +1 -1 | @@ -46,7 +46,7 @@ | ||
| 46 | 46 | # drift this comment warns about wearing a different hat: one input, and |
| 47 | 47 | # the window and the terminal are the same library either way. |
| 48 | 48 | jolt-native = { |
| 49 | - url = "git+https://gitlab.com/nandithebull/jolt-native?rev=c2d912f670b7a2e5808970d17cecf51c6c87cfbf"; | |
| 49 | + url = "git+https://gitlab.com/nandithebull/jolt-native?rev=384390d0e216cb6f0e9be8e597b9d16e7a64bb29"; | |
| 50 | 50 | flake = false; |
| 51 | 51 | }; |
| 52 | 52 | |
| @@ -46,7 +46,7 @@ | |||
| 46 | # drift this comment warns about wearing a different hat: one input, and | 46 | # drift this comment warns about wearing a different hat: one input, and |
| 47 | # the window and the terminal are the same library either way. | 47 | # the window and the terminal are the same library either way. |
| 48 | jolt-native = { | 48 | jolt-native = { |
| 49 | - url = "git+https://gitlab.com/nandithebull/jolt-native?rev=c2d912f670b7a2e5808970d17cecf51c6c87cfbf"; | 49 | + url = "git+https://gitlab.com/nandithebull/jolt-native?rev=384390d0e216cb6f0e9be8e597b9d16e7a64bb29"; |
| 50 | flake = false; | 50 | flake = false; |
| 51 | }; | 51 | }; |
| 52 | 52 | ||