GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — perf: vmk port stack — VirtualList, quick wins y height-skip (22 commits) by LuisAlbertoMK · Pull Request #1 · LuisAlbertoMK/opencode

Conversation

@LuisAlbertoMK

@LuisAlbertoMK LuisAlbertoMK commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Base: ef2792511d (fork/dev)

Highlights

  • VirtualList Fase 5.1 y 5.3
  • prefix-sum O(log n)
  • recycle scopes
  • height-skip ciclo 2
  • quick wins core
  • lazy CLI
  • truncateLimit MCP
  • Fixes lsp/plugin

Evidencia

  • Tests TUI: 204 passed / 1 pre-existente (docs/vmk/mejora-log.md, ADR-001..005)
  • Typecheck verde (30/30 packages)

Nota

  • wal-mmap y bytecode fueron rejected con evidencia; no se incluyen en este PR.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
LuisAlbertoMK and others added 22 commits September 2, 2026 13:32
@LuisAlbertoMK
perf(plugin): parallel internal plugin loading — Effect.forEach with …
08e3e91
…concurrency unbounded

- Internal plugins (10 auth plugins): for...of secuencial → Effect.forEach
  concurrency:unbounded. Seguro porque son auth plugins independientes
  sin shared state durante init.
- Config hooks: for...of secuencial → Effect.forEach concurrency:unbounded.
  Cada hook recibe el mismo config, sin dependencias entre sí.
- External plugins mantienen carga secuencial (determinismo de hooks).
- Triple verify: typecheck 0 errors in file ✅ / static review PASS ✅ /
  build binary 130.5MB smoke test PASS ✅

(cherry picked from commit d2f49d8)
@LuisAlbertoMK
fix(lsp): idle TTL timeout and LRU eviction policy
aefe665
(cherry picked from commit 3b824da)
@LuisAlbertoMK
feat(core): add per-server truncateLimit for MCP token budget
8de02f3
- tool_output global: 500 lines/10KB
- truncateLimit added to V1+V2 config schema (Local + Remote)
- MCP.toolTruncateLimit() exposed in mcp/index.ts
- Used in session/tools.ts to override global maxBytes per server
- Config: codebase-memory=8KB, engram=4KB
- AGENTS.md: new MCP Token Budget Rules section
- BACKLOG: anomalyco#2 Parallel Plugin Loading -> Skip (already parallel)
- CYCLE: removed empty Cycle 6
- METRICAS/BITACORA/VMK-MANIFEST: session tracking

(cherry picked from commit 8a144ec)
@LuisAlbertoMK
test: add toolTruncateLimit stub to MCP service mocks
2cca789
@LuisAlbertoMK
feat(tui): VirtualList component for Fase 5.1 — render-only visible m…
7f0ef45
…essages

Create VirtualList component that reduces SolidJS/Yoga overhead by
rendering only items in the visible viewport + overscan buffer (3-5 items)
instead of all messages.

Key design decisions:
- Poll scroll position at 10fps (no scroll events in opentui)
- Use estimated heights (3 lines per item) — no reactive layout events
- Integrates into session component replacing <For each={messages()}>
- Maintains all existing rendering logic (revert, user/assistant message types)

Build and lint clean (pre-existing error in error-component.tsx only).
- 1 new file: packages/tui/src/component/virtual-list.tsx

(cherry picked from commit aef949d)
@LuisAlbertoMK
feat(tui): VirtualList height caching — Fase 5.3
2ba26d5
Add real height measurement of rendered items via polling refs.
- Yoga-computed heights read in the same 100ms polling loop as scroll tracking
- Cache Map<index, lines> accumulated over time, fallback to estimate (5 lines)
- Range calculation uses cached heights for accurate padding/scroll positioning
- Extra box wrapper per item captures total height including margins/borders

Build and lint clean (pre-existing error-component.tsx only).

(cherry picked from commit a0e463e)
@LuisAlbertoMK
perf(opencode): lazy CLI commands — static dynamic-import loaders + f…
382854a
…ast --help/--version paths

Ported from vMK-dev commits 84c6784 + 533fa4a, adapted to current
upstream entrypoint. Uses a cmdLoaders map of static import() specifiers so
Bun bundles command modules at build time without evaluating their top-level
code until invocation (compiled-binary safe). First-argument --help/--version
take fast paths; subcommand flags keep the original scoped-help behavior.
@LuisAlbertoMK
perf(core): quick wins — WASM defer, tool cache, adaptive polling, ri…
de75a6c
…ng buffer

- VirtualList: two-tier polling (100ms active → 500ms idle) reduces CPU
  60-80% when not scrolling
- registry.ts: generation-counter cache on materialize() — returns cached
  Materialization when tool registrations haven't changed, avoiding
  per-turn Map rebuild + permission filtering
- compaction.ts: LRU cache 10→100 entries + WeakMap for fast identity
  lookup on repeated estimate() calls with same object reference
- message-updater.ts: incremental index shift on eviction instead of
  O(n) rebuildIndex() — shifts Maps by evictCount, re-scans only tail
- build.ts: fix post-build rename to handle .exe extension on Windows
- script/index.ts: fix package.json path (packages/opencode → packages/cli)
- web/package.json: fix workspace dependency (opencode → @opencode-ai/cli)

Build verified: opencode-vMK.exe (122MB) created successfully.
All 13 bash-parser tests pass. Typecheck clean. Lint 0 errors.

(cherry picked from commit 7eca550)
@LuisAlbertoMK
fix(tui): use hoisted scrollbox ref for initial lastScrollTop in Virt…
9f1b57c
…ualList
@LuisAlbertoMK
refactor(tui): extract pure computeVisibleRange from VirtualList memo
e7d8968
No behavior change — the 4-pass O(n) scan moves verbatim into a pure,
Solid-free function so it can be unit-tested and benchmarked in isolation.
Prepares Ciclo 1 of experimento/mejora-autonoma-2026-09-03.
@LuisAlbertoMK
perf(tui): prefix-sum visible range — O(log n) per scroll tick
590bf90
Ciclo 1 of experimento/mejora-autonoma-2026-09-03. 3 approaches evaluated
with equivalence-verified benchmark (2500 random queries each):
- A prefix-sum+binary search (WINNER): 82-91% faster at n=100/1000/5000
- B two-pointer: discarded — amortized pointer helps but O(n) padding remains
- C chunked K=32: discarded — within-chunk walks + O(n) padding

The prefix structure rebuilds only when the heights cache changes (memo),
never per scroll tick. Baseline algorithm kept exported for regression
comparison. Tests: exact equivalence + boundary pinning (7/7 green).
@LuisAlbertoMK
docs(vmk): ciclo 1 deliverables — mejora-log, benchmarks, ADR-001, ro…
4367292
…llback-map
@LuisAlbertoMK
fix(tui): release destroyed VirtualList item refs — stop unbounded RA…
144a09b
…M growth

Ciclo 2 of experimento/mejora-autonoma-2026-09-03. itemRefs retained one
stale entry (and its Zig-backed BoxRenderable) per ever-rendered item with
no cleanup — growth proportional to scroll distance. 3 approaches evaluated:
- A onCleanup guard (winner): releases on row disposal, el-identity check
  guards against re-mount ordering
- B isDestroyed skip in tick (kept as defense-in-depth)
- C WeakRef: discarded — the Map is the sole retainer, plain delete is
  simpler and deterministic

Simulation metrics (2000 window shifts): retained entries 2005 -> 18
(-99.1%); tick measurement loop CPU -48.9% for long-scroll sessions.
@LuisAlbertoMK
docs(vmk): ciclo 2 deliverables — log, ADR-002, rollback-map
8a75bb6
@LuisAlbertoMK
docs(vmk): ciclos 3-4 rejected with evidence + deferred candidates + …
41b33c5
…stop condition
@LuisAlbertoMK
perf(build): bytecode rejected, smol opt-in flag — boot bench n=8 (ci…
f9782e9
…clo 5)
@LuisAlbertoMK
perf(db): wal-mmap rejected — reads +30-60% worse on cache-resident d…
13a999e
…bs (ciclo 5)
@LuisAlbertoMK
perf(tui): recycle VirtualList child scopes — untracked absolute inde…
ad4e5fe
…x (ciclo 6)
@LuisAlbertoMK
fix(tui): type the recycled-scroll test fake as ScrollBoxRenderable
150d34e
@LuisAlbertoMK
fix(app,enterprise): make custom-elements.d.ts a valid triple-slash r…
1d0042f
…eference
@LuisAlbertoMK
perf(tui): skip VirtualList height measurement when cache complete (c…
3f0a4a0
…iclo 2)
@LuisAlbertoMK
docs(vmk): add ciclo2 height-skip completion report
c34f19f
@github-actions github-actions Bot added needs:compliance needs:title labels Sep 5, 2026
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Hey! Your PR title perf: vmk port stack — VirtualList, quick wins y height-skip (22 commits) doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@LuisAlbertoMK
docs(vmk): ciclo 7 sync hydration rejected with evidence
fab7d70
@github-actions github-actions Bot removed the needs:compliance label Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

needs:title

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@LuisAlbertoMK
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.