• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bolshakov / stoplight / 14419258696 / 3
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 12 Apr 2025 11:42AM UTC
Files 22
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Apr 2025 11:41AM UTC coverage: 100.0%. Remained the same
14419258696.3

push

github

web-flow
Optimize notification locking for improved responsiveness (#293)

The original implementation of `#with_deduplicated_notification` in `Memory` data store was locking the
entire data store via MonitorMixin's `synchronize` while yielding to notifiers. Even though notifications
are rare in our system, when they do happen, they could potentially block other critical operations.

This change introduces a focused optimization:

1. Separate the notification lock from the main data store lock by using a dedicated `Thread::Mutex` specifically for notifications
2. Move the yield operation outside of the synchronized block to prevent blocking other operations during notification processing
3. Add benchmarks to measure and verify the performance characteristics

Under simulated high contention (10 resource names, 16 threads with 0.001s operations):
- Original implementation: ~36.7s real time
- Optimized implementation: ~2.8s real time (13x faster)

Even under low contention scenarios, which better represent our production environment, the optimized version showed similar improvements in responsiveness.

While notifications are infrequent in our system, the impact of blocking the entire data store during a
notification can still affect system responsiveness. This change ensures that when notifications do occur,
they don't interfere with other critical operations that might be happening simultaneously.

The optimization maintains the same semantics and thread safety guarantees while significantly reducing
the potential for lock contention during these occasional but important notification events.

427 of 427 relevant lines covered (100.0%)

84.11 hits per line

Source Files on job ruby-3.3 - 14419258696.3
  • Tree
  • List 22
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 14419258696
  • eb74e12b on github
  • Prev Job for on master (#14405612323.2)
  • Next Job for on master (#14439395417.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc