Fix/gcs prefix directory bleed - #25
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.