Conversation
- Replaced manual get/create/store pattern with Concurrent::Map#fetch_or_store - Simplified class-level fetch method for thread-safe lazy initialization - Simplified instance fetch method using same pattern - Improved delete method with ternary operator - Improved kill method to extract redis connection logic
Changed wait time from 1 second to 0 (non-blocking) when re-acquiring lock after job failure. This prevents worker threads from being blocked unnecessarily while still maintaining the lock to prevent duplicate jobs during retry. Consistent with fix in until_and_while_executing.
029b22d to
dddd982
Compare
Added comprehensive benchmarking infrastructure: - bin/benchmark_improvements: Targeted benchmarks for specific improvements - bin/compare_performance: Automated branch comparison tool - BENCHMARKING.md: Complete guide for running and interpreting benchmarks Key features: - Tests all 7 major performance improvements - Automatic branch comparison with metrics summary - Memory allocation tracking - IPS (iterations per second) measurements - Results saved to tmp/benchmark_results/ Usage: bin/compare_performance main improved-exception-handling
Instead of manually calling scripts with argv, use locksmith which handles all the proper formatting. This is more reliable and matches how the gem is actually used.
Use Gem.clear_paths to reload gem paths after installation so newly installed gems are immediately available.
Move benchmark gem requires before bundler/setup so they can be loaded from system gems (not Gemfile). This allows users to install the benchmark gems separately without adding them to the project.
Wrap callback exception test in rescue block so it works on both main (re-raises) and improved (doesn't re-raise) branches.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.