◐ Shell
clean mode source ↗

feat: Add lazy initialization and feature service caching by franciscojavierarceo · Pull Request #5924 · feast-dev/feast

and others added 2 commits

January 29, 2026 23:31
Implement performance optimizations for FeatureStore:

- **Lazy Initialization**: Convert registry, provider, and OpenLineage emitter
  to lazy properties. Reduces cold start from 2.4s to 0.5s (5x improvement).

- **Feature Service Caching**: Add caching layer for feature service resolution.
  Observed 19.6x speedup on cached calls during validation.

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

devin-ai-integration[bot]

When refresh_registry() or plan() methods refresh the registry, the feature
service cache must be cleared to avoid serving stale cached results.

- Add _clear_feature_service_cache() helper method
- Clear cache in refresh_registry() and plan() methods
- Prevents data consistency issues with cached feature services

devin-ai-integration[bot]

Fixes AttributeError where tests were directly accessing _registry before
lazy initialization. With lazy loading, _registry starts as None and must
be accessed through the registry property to trigger initialization.

- Replace ._registry. with .registry. in test files
- Add runtime error check in registry property for failed initialization
- Ensures backward compatibility with existing code patterns

Fixes CI test failures in search API tests.

devin-ai-integration[bot]

The __repr__ method was accidentally calling self.registry (property) instead of
self._registry (attribute), which would trigger lazy initialization whenever
the FeatureStore object was printed or logged.

This completely defeated the lazy loading optimization since any debugging,
logging, or repr() call would cause full initialization (negating the 2.4s
to 0.5s performance gain).

- Change self.registry to self._registry in __repr__ method
- Preserves lazy loading benefits for debugging/logging scenarios
- Maintains correct status reporting without side effects

YassinNouh21 pushed a commit to YassinNouh21/feast that referenced this pull request

Feb 7, 2026
…5924)

* feat: Add lazy initialization and feature service caching

Implement performance optimizations for FeatureStore:

- **Lazy Initialization**: Convert registry, provider, and OpenLineage emitter
  to lazy properties. Reduces cold start from 2.4s to 0.5s (5x improvement).

- **Feature Service Caching**: Add caching layer for feature service resolution.
  Observed 19.6x speedup on cached calls during validation.

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

* fix: Add type annotations and formatting fixes for performance optimizations

* fix: Clear feature service cache on registry refresh

When refresh_registry() or plan() methods refresh the registry, the feature
service cache must be cleared to avoid serving stale cached results.

- Add _clear_feature_service_cache() helper method
- Clear cache in refresh_registry() and plan() methods
- Prevents data consistency issues with cached feature services

* fix: Replace direct _registry access with registry property

Fixes AttributeError where tests were directly accessing _registry before
lazy initialization. With lazy loading, _registry starts as None and must
be accessed through the registry property to trigger initialization.

- Replace ._registry. with .registry. in test files
- Add runtime error check in registry property for failed initialization
- Ensures backward compatibility with existing code patterns

Fixes CI test failures in search API tests.

* fix: Prevent __repr__ from triggering lazy initialization

The __repr__ method was accidentally calling self.registry (property) instead of
self._registry (attribute), which would trigger lazy initialization whenever
the FeatureStore object was printed or logged.

This completely defeated the lazy loading optimization since any debugging,
logging, or repr() call would cause full initialization (negating the 2.4s
to 0.5s performance gain).

- Change self.registry to self._registry in __repr__ method
- Preserves lazy loading benefits for debugging/logging scenarios
- Maintains correct status reporting without side effects

---------

Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

YassinNouh21 pushed a commit to YassinNouh21/feast that referenced this pull request

Feb 7, 2026
…5924)

* feat: Add lazy initialization and feature service caching

Implement performance optimizations for FeatureStore:

- **Lazy Initialization**: Convert registry, provider, and OpenLineage emitter
  to lazy properties. Reduces cold start from 2.4s to 0.5s (5x improvement).

- **Feature Service Caching**: Add caching layer for feature service resolution.
  Observed 19.6x speedup on cached calls during validation.

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

* fix: Add type annotations and formatting fixes for performance optimizations

* fix: Clear feature service cache on registry refresh

When refresh_registry() or plan() methods refresh the registry, the feature
service cache must be cleared to avoid serving stale cached results.

- Add _clear_feature_service_cache() helper method
- Clear cache in refresh_registry() and plan() methods
- Prevents data consistency issues with cached feature services

* fix: Replace direct _registry access with registry property

Fixes AttributeError where tests were directly accessing _registry before
lazy initialization. With lazy loading, _registry starts as None and must
be accessed through the registry property to trigger initialization.

- Replace ._registry. with .registry. in test files
- Add runtime error check in registry property for failed initialization
- Ensures backward compatibility with existing code patterns

Fixes CI test failures in search API tests.

* fix: Prevent __repr__ from triggering lazy initialization

The __repr__ method was accidentally calling self.registry (property) instead of
self._registry (attribute), which would trigger lazy initialization whenever
the FeatureStore object was printed or logged.

This completely defeated the lazy loading optimization since any debugging,
logging, or repr() call would cause full initialization (negating the 2.4s
to 0.5s performance gain).

- Change self.registry to self._registry in __repr__ method
- Preserves lazy loading benefits for debugging/logging scenarios
- Maintains correct status reporting without side effects

---------

Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>

soooojinlee pushed a commit to soooojinlee/feast that referenced this pull request

Feb 18, 2026

jyejare pushed a commit to opendatahub-io/feast that referenced this pull request

Mar 9, 2026
…5924)

* feat: Add lazy initialization and feature service caching

Implement performance optimizations for FeatureStore:

- **Lazy Initialization**: Convert registry, provider, and OpenLineage emitter
  to lazy properties. Reduces cold start from 2.4s to 0.5s (5x improvement).

- **Feature Service Caching**: Add caching layer for feature service resolution.
  Observed 19.6x speedup on cached calls during validation.

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

* fix: Add type annotations and formatting fixes for performance optimizations

* fix: Clear feature service cache on registry refresh

When refresh_registry() or plan() methods refresh the registry, the feature
service cache must be cleared to avoid serving stale cached results.

- Add _clear_feature_service_cache() helper method
- Clear cache in refresh_registry() and plan() methods
- Prevents data consistency issues with cached feature services

* fix: Replace direct _registry access with registry property

Fixes AttributeError where tests were directly accessing _registry before
lazy initialization. With lazy loading, _registry starts as None and must
be accessed through the registry property to trigger initialization.

- Replace ._registry. with .registry. in test files
- Add runtime error check in registry property for failed initialization
- Ensures backward compatibility with existing code patterns

Fixes CI test failures in search API tests.

* fix: Prevent __repr__ from triggering lazy initialization

The __repr__ method was accidentally calling self.registry (property) instead of
self._registry (attribute), which would trigger lazy initialization whenever
the FeatureStore object was printed or logged.

This completely defeated the lazy loading optimization since any debugging,
logging, or repr() call would cause full initialization (negating the 2.4s
to 0.5s performance gain).

- Change self.registry to self._registry in __repr__ method
- Preserves lazy loading benefits for debugging/logging scenarios
- Maintains correct status reporting without side effects

---------

Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>

Shizoqua pushed a commit to Shizoqua/feast that referenced this pull request

Mar 18, 2026
…5924)

* feat: Add lazy initialization and feature service caching

Implement performance optimizations for FeatureStore:

- **Lazy Initialization**: Convert registry, provider, and OpenLineage emitter
  to lazy properties. Reduces cold start from 2.4s to 0.5s (5x improvement).

- **Feature Service Caching**: Add caching layer for feature service resolution.
  Observed 19.6x speedup on cached calls during validation.

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

* fix: Add type annotations and formatting fixes for performance optimizations

* fix: Clear feature service cache on registry refresh

When refresh_registry() or plan() methods refresh the registry, the feature
service cache must be cleared to avoid serving stale cached results.

- Add _clear_feature_service_cache() helper method
- Clear cache in refresh_registry() and plan() methods
- Prevents data consistency issues with cached feature services

* fix: Replace direct _registry access with registry property

Fixes AttributeError where tests were directly accessing _registry before
lazy initialization. With lazy loading, _registry starts as None and must
be accessed through the registry property to trigger initialization.

- Replace ._registry. with .registry. in test files
- Add runtime error check in registry property for failed initialization
- Ensures backward compatibility with existing code patterns

Fixes CI test failures in search API tests.

* fix: Prevent __repr__ from triggering lazy initialization

The __repr__ method was accidentally calling self.registry (property) instead of
self._registry (attribute), which would trigger lazy initialization whenever
the FeatureStore object was printed or logged.

This completely defeated the lazy loading optimization since any debugging,
logging, or repr() call would cause full initialization (negating the 2.4s
to 0.5s performance gain).

- Change self.registry to self._registry in __repr__ method
- Preserves lazy loading benefits for debugging/logging scenarios
- Maintains correct status reporting without side effects

---------

Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
Signed-off-by: Shizoqua <hr.lanreshittu@gmail.com>

Shizoqua pushed a commit to Shizoqua/feast that referenced this pull request

Mar 18, 2026