mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 02:29:33 +01:00
perf(story-mode): a page budget that halves the longest live pages
A sweep of the Story core over every local transcript (1,311 files,
3,855 turns: no errors, never more than 12 panels, the slowest page 12
ms) found pages up to 551 KB (157 KB gzipped), refetched every few
seconds while a long turn runs. The page text budget (outputs, hunks,
helper texts; the oldest events give theirs up first) goes from 400,000
to 120,000 characters: 94% of turns never reach it, and the longest page
is now 74 KB gzipped.
An edit whose lines the budget dropped now says so ("left out to keep a
long turn fast"), instead of the wording for a file a script wrote.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
99c15777f5
commit
67595ea980
2 files changed
+9
-3
No files matched your search
+6
-2
@@ -61,8 +61,12 @@ export const STORY_LIMITS = Object.freeze({
|
||||
todoItems: 12,
|
||||
eventsPerPage: 800,
|
||||
panelsPerPage: 12,
|
||||
/** Characters of output, hunk and helper text per page; older events give theirs up first. */
|
||||
pageTextBudget: 400_000,
|
||||
/**
|
||||
* Characters of output, hunk and helper text per page; older events give theirs up first. Sized on
|
||||
* 3,855 local turns: 94% never reach it, and the longest live page went from 157 KB to 74 KB
|
||||
* gzipped (it is refetched every few seconds while it changes).
|
||||
*/
|
||||
pageTextBudget: 120_000,
|
||||
turnsListed: 60,
|
||||
});
|
||||
|
||||
|
||||
@@ -3448,7 +3448,9 @@ Object.assign(CodemanApp.prototype, {
|
||||
'story-empty',
|
||||
edit.hunks?.length
|
||||
? 'Some lines of this edit were left out. Open the file to see all of it.'
|
||||
: 'What changed is not in the transcript: a script or another program wrote this file. Open it to see it as it is now.'
|
||||
: edit.added || edit.removed
|
||||
? 'The lines of this edit were left out to keep a long turn fast. Open the file to see it as it is now.'
|
||||
: 'What changed is not in the transcript: a script or another program wrote this file. Open it to see it as it is now.'
|
||||
)
|
||||
);
|
||||
return section;
|
||||
|
||||
Reference in new issue
Block a user