Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

perf: avoid creating exceptions when no hook implements the error stage

Đang mở
#2,056 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@toddbaert đang làm issue này rồi.

Từ ngày 8/10/2026.

  • #2057 của @toddbaert — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

enhancement

When no provider is set (or the provider is NOT_READY/FATAL), evaluateFlag throws an exception internally to reach its catch block. Similarly, for provider-returned errors, we create an exception to pass to error hooks, even if no hook implements error.

The ProviderNotReadyError stack trace is suppressed, but APM agents that instrument exceptions can still capture their own, which adds overhead to every evaluation.

Proposal:

  • don't throw for NOT_READY/FATAL; build the error details directly
  • only create the exception if an attached hook actually overrides error (detected once per hook class)

Results (callers see the same errorCode, reason and value) are unchanged. Hooks that don't override error keep their no-op default, and the SDK just skips calling it.

Ngôn ngữ chính
Java
Star
128
Fork
60
Merge trung bình
19 giờ 11 phút
Pull request đã merge (30 ngày)
19

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của open-feature/java-sdk

Tất cả issue của open-feature/java-sdk

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.