Skip to content

Lazy initialization of leap time list causes inconsistent performance when requesting the time from the ECA #149

@anragsi

Description

@anragsi

Problem

When requesting the time from the ECA, the performance is inconsistent due to lazy initialization of the leap time list. This issue is traced to the Time.cpp file, where the leap time list is not eagerly initialized, leading to variable delays depending on whether initialization has already occurred.

Location

  • File: Time.cpp

Impact

  • Users experience unpredictable latency the first time the time is requested.
  • Subsequent requests are faster, indicating that the initialization process is the main bottleneck.

Suggested Improvement

  • Refactor the initialization logic in Time.cpp to ensure the leap time list is loaded eagerly at startup or in a thread-safe way that does not block time requests.

Steps to Reproduce

  1. Make a time request from the ECA after restarting the service.
  2. Observe the delay in response for the first request.
  3. Repeat the request and note the improved response time.

Expected Behavior

  • Time requests should have consistent performance, regardless of whether the leap time list has already been initialized.

Additional Context

  • This affects timing-critical applications relying on the ECA for accurate time.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions