Skip to content

heronin: place names stop growing and rescanning - #36

Merged
fizzy-pm[bot] merged 1 commit into
mainfrom
heronin/places-followups
Nov 11, 2026
Merged

fizzy-pm[bot] merged 1 commit into
mainfrom
heronin/places-followups

Conversation

@fizzy-publish

@fizzy-publish fizzy-publish Bot commented Nov 11, 2026

Copy link
Copy Markdown

heronin: place names stop growing and rescanning

Part of fizzyedit/work#1186

In plain words

Looking up names for photo locations now uses less memory as your library grows. Once every location has been checked, fizzy avoids searching the same unchanged library again.

What changes

  • Remembered answers grow efficiently, and completed searches stay idle until their inputs change.
  • Photo labels share the same naming rule across the library, photo and species views.
  • Invalid location requests explain why they were rejected.
    answers: std.ArrayList(Answer) = .empty,

What you will notice

Nearby names still appear with “near” before saving. Saved names and later renames appear consistently in photo labels.

How we know it works

An in-process test answers 200 distinct photo locations and checks memory use and completed-search invalidation. The fixed arena measures 50,778 bytes; temporarily restoring the old per-answer reallocation strategy measures 696,288 bytes and fails the 128 KiB limit. The rename test checks “near Sea Mount”, “Sea Mount”, then “Point” through the shared photo-label function inside frames.

All six requested gates pass, including all 67 test build steps. No socket exceptions were needed.

How this serves fizzy

Platform: efficient location lookup keeps larger photo libraries practical across devices.

For agents: technical summary

Goal

Bound answer-storage growth and avoid repeated scans of unchanged inputs while preserving place-label behavior.

What changed and why

Answers use an ArrayList allocated from the existing arena. A completed scan records the photo pointer, photo count, saved count and answer count. The logic label function accepts an allocator, and the three views call the shared photoPlace composition. Invalid points return an explanatory 400 body.

Budget: 23 added non-test source lines (cap 55); 122 added plus deleted source/test lines (cap 170). Counts use git diff --numstat HEAD; no new source files. Delivery artifacts are excluded under R5.

How it was verified

  • zig fmt --check build.zig tools tests/check_public model app server: pass.
  • zig build: 66/66 steps succeeded.
  • zig build server: 3/3 steps succeeded.
  • zig build test: 67/67 steps succeeded.
  • zig build web: 54/54 steps succeeded.
  • zig build check-public: 3/3 steps succeeded.
  • Memory regression fails with the old reallocation strategy and passes with ArrayList.
  • git diff --check: pass.

Not done / follow-ups

Out-of-scope work remains untouched. No commit, staging, publishing or GitHub actions were performed.

Part of fizzyedit/work#1186

Signed-off-by: fizzy pop-os-codex-1 <slot+pop-os-codex-1@fizzy.invalid>
@fizzy-pm
fizzy-pm Bot merged commit 7921f76 into main Nov 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants