Skip check for pending breakpoints if no breakpoints are present #738
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.
Description
Describe your changes:
ThreadClient.current.on_loadspend time pushing and popping the :load operation on the event queue, and waiting for the :load event to be handled.require "debug", event when there are no breakpoints set at all. This seems to be at odd's with the README's "Fast: No performance penalty on non-stepping mode and non-breakpoints."ThreadClient.current.on_loadwhen there are no breakpoints present at all, we can save some of this time.ThreadClient.current.on_loadis to handle any pending breakpoints in the loaded code, which we can safely skip if@bpsis empty.Example:
file_1.rb:
file_2.rb:
Before 949562d:
After 949562d:
^ It's a significant improvement in the overhead when using
require "debug"