Skip to content

refactor: Implement lazy loading for street network in MLYMetadata#142

Merged
koito19960406 merged 2 commits intomainfrom
fix/lazy-street-network
Feb 19, 2026
Merged

refactor: Implement lazy loading for street network in MLYMetadata#142
koito19960406 merged 2 commits intomainfrom
fix/lazy-street-network

Conversation

@koito19960406
Copy link
Owner

This commit refactors the MLYMetadata class to load the street network data lazily, improving initialization efficiency. The _ensure_street_network method is introduced to handle the loading and preparation of the street network only when needed. Additionally, the test fixture is updated to pre-warm the street network for valid test cases.

Key Changes

  • Removed immediate loading of street network data during initialization.
  • Added _ensure_street_network method for lazy loading.
  • Updated test fixture to call _ensure_street_network for caching.

These changes enhance performance and resource management in the MLYMetadata class.

This commit refactors the MLYMetadata class to load the street network data lazily, improving initialization efficiency. The `_ensure_street_network` method is introduced to handle the loading and preparation of the street network only when needed. Additionally, the test fixture is updated to pre-warm the street network for valid test cases.

### Key Changes
- Removed immediate loading of street network data during initialization.
- Added `_ensure_street_network` method for lazy loading.
- Updated test fixture to call `_ensure_street_network` for caching.

These changes enhance performance and resource management in the MLYMetadata class.
@cursor
Copy link

cursor bot commented Feb 19, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on March 11.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

This commit refactors the DataFrame creation process in the MLYMetadata class by consolidating the initialization of the `sn_pl` DataFrame into a single line. This change enhances code readability and maintains the same functionality.

### Key Changes
- Combined multiple lines into a single line for creating the `sn_pl` DataFrame.

This adjustment contributes to cleaner and more maintainable code in the MLYMetadata class.
@koito19960406 koito19960406 merged commit 26a6ad1 into main Feb 19, 2026
5 of 11 checks passed
@koito19960406 koito19960406 deleted the fix/lazy-street-network branch February 19, 2026 22:45
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