Skip to content

app: answer leaves-many counts and gzip at level 1 - #557

Merged
akhileshh merged 1 commit into
pcgv3from
leaves-many-l2-counts-pcgv3
Nov 24, 2026
Merged

akhileshh merged 1 commit into
pcgv3from
leaves-many-l2-counts-pcgv3

Conversation

@akhileshh

Copy link
Copy Markdown
Contributor

Summary

  • The pcgv3 port of the same change against main: node/leaves_many takes counts_only=true and answers {"<node_id>": <count>}, each node's number of nodes at stop_layer, in place of their ids. Without the flag the answer is unchanged.
  • after_request gzips every answer at level 1 rather than the default 9, through pcgv3's cloudvolume.compression, which takes the same compresslevel.

Why

  • A caller sizing fragments by their L2 count no longer downloads every L2 id to count them.
  • Measured through pcgv3's app with the graph walk stubbed, a million-id answer now gzips in 0.192 s, to 9.69 MB against 8.85 MB at level 9.
  • Every gzip decoder reads either level, so clients need no change.

🤖 Generated with Claude Code

- handle_leaves_many answers each node's leaf count when counts_only=true.
- after_request gzips at level 1, 4x faster than the default 9 for 9% more bytes.

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##            pcgv3     #557   +/-   ##
=======================================
  Coverage   67.51%   67.51%           
=======================================
  Files          89       89           
  Lines        8643     8643           
  Branches     1149     1149           
=======================================
  Hits         5835     5835           
  Misses       2619     2619           
  Partials      189      189           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@akhileshh
akhileshh merged commit febd987 into pcgv3 Nov 24, 2026
3 checks passed
@akhileshh
akhileshh deleted the leaves-many-l2-counts-pcgv3 branch November 24, 2026 02:46
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.

1 participant