Skip to content

Comments

Improve presentation performance#803

Open
borkdude wants to merge 23 commits intomainfrom
cljs-deps-perf
Open

Improve presentation performance#803
borkdude wants to merge 23 commits intomainfrom
cljs-deps-perf

Conversation

@borkdude
Copy link
Collaborator

@borkdude borkdude commented Feb 5, 2026

Improves presentation performance by

  • avoiding postwalks for prepend-required-cljs and process-blobs
  • caching the image processing in memory
  • lowering the bounded count limit from 1.000.000 to 1.000

Closes #731.

@borkdude borkdude mentioned this pull request Feb 5, 2026
5 tasks
@mk mk changed the title Performance: avoid postwalk for collecting viewer info Improve presentation performance Feb 10, 2026
@borkdude
Copy link
Collaborator Author

@mk Benchmark running 20x book.clj rendering against main vs this PR:

⏺ Now we see a real difference!
  ┌────────┬─────────────┬────────────────┐
  │ Metric │ Main branch │ cljs-deps-perf │
  ├────────┼─────────────┼────────────────┤
  │ Avg    │ 483.2ms     │ 433.4ms        │
  ├────────┼─────────────┼────────────────┤
  │ Median │ 474.8ms     │ 419.4ms        │
  ├────────┼─────────────┼────────────────┤
  │ Min    │ 414.4ms     │ 392.1ms        │
  ├────────┼─────────────┼────────────────┤
  │ Max    │ 683.9ms     │ 586.8ms        │
  └────────┴─────────────┴────────────────┘
  That's a ~10% improvement overall, and the presentation time is dramatically lower — look at the steady-state numbers:

  - Main: presentation ~150-160ms
  - Optimized: presentation ~70-85ms

  Presentation time is roughly halved. The overall improvement is diluted by parsing and eval time which are unchanged.

@borkdude
Copy link
Collaborator Author

@mk Ready to merge on my behalf

@jackrusher
Copy link
Collaborator

@borkdude Claude Code output? 😆

@borkdude
Copy link
Collaborator Author

@jackrusher yes, I told it to run my benchmark agains the current branch and a REPL that was opened on the main branch ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Presentation performance notes

3 participants