Skip to content

Fix/gcs prefix directory bleed - #25

Merged
anna-grim merged 2 commits into
mainfrom
fix/gcs-prefix-directory-bleed
Sep 23, 2026
Merged

anna-grim merged 2 commits into
mainfrom
fix/gcs-prefix-directory-bleed

Conversation

@anna-grim

Copy link
Copy Markdown
Collaborator

No description provided.

Anna Grim and others added 2 commits September 21, 2026 16:33
component_to_zipped_swc called rx.dfs_edges once per component. That
call allocates a visited array over the whole graph, so it cost 7 ms
per component on a 13M-node graph regardless of component size, and a
full to_zipped_swcs of ~520k components took about an hour. Replace it
with a Python DFS over self.neighbors, which only touches the
component: 0.1 ms per component at the same scale. Output skeletons are
unchanged (verified node and edge sets on 9,507 components).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
list_blobs uses a string prefix, not a directory boundary. A path like
".../swcs" would also match ".../swcs_unfiltered/" because that name
starts with "swcs". This caused both directories to be processed,
loading every SWC twice and producing identical .0/.1 duplicate pairs
in the output zip.

Fix: append "/" to the prefix before calling list_blobs so it is
scoped to the intended directory only.

Also change the extension filter from a substring check (`extension in
name`) to `name.endswith(extension)`, matching the correct S3
implementation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@anna-grim
anna-grim merged commit c89ec35 into main Sep 23, 2026
0 of 3 checks passed
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