Skip to content

Disabled breakpoints slow down execution #19880

Description

@chisandrei

Bug description
The issue is that after adding a breakpoint and disabling it, the execution of a method having that disabled breakpoint slows down significantly, as even if disabled the breakpoint announcer that it was hit. In Pharo 13 this happens in Breakpoint>>#breakInContext:node: and in Pharo 14 in DebugPoint>>#hitWithContext:

To Reproduce
Place a breakpoint in a method and disable it, then benchmark the execution

Expected behavior
Would not expect a significantly slowdown if the breakpoint is disabled.

Screenshots

Screenshots for Pharo 13 and Pharo 14. Numbers of execution drops significantly. The code in the first playground was executed before adding the breakpoint. The code in the second playground is after adding a breakpoint and disabling it.

Image Image

Version information:
Tested in Pharo 13 and Pharo 14

Expected development cost
A possible fix would be to only announce the hit if the breakpoint is enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions