JuMP.jl icon indicating copy to clipboard operation
JuMP.jl copied to clipboard

(slow) operations tracker

Open joaquimg opened this issue 9 months ago • 4 comments

This adds the optional ability to mark all places where slow operations that allocate expression occur. Keeping the stack might be a lot of data, but it is a way to properly identify the issues instead of erroring one by one.

Possible additional functionality: 1 - also mark the operation type. A bit redundant with the stack, but might lead to summary reports. 2 - create a user friendly summary

TODO

  • [ ] add tests
  • [ ] add docs session, to be referenced in the performance issues.

joaquimg avatar Apr 01 '25 05:04 joaquimg

Codecov Report

Attention: Patch coverage is 65.41353% with 46 lines in your changes missing coverage. Please review.

Project coverage is 99.25%. Comparing base (57132d8) to head (bd416ee).

Files with missing lines Patch % Lines
src/operators.jl 65.41% 46 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##            master    #3970      +/-   ##
===========================================
- Coverage   100.00%   99.25%   -0.75%     
===========================================
  Files           43       43              
  Lines         6076     6207     +131     
===========================================
+ Hits          6076     6161      +85     
- Misses           0       46      +46     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Apr 01 '25 06:04 codecov[bot]

I think we decided not to do this.

We have some better support with set_macro_timing , but this tutorial could still be improved:

https://jump.dev/JuMP.jl/dev/tutorials/getting_started/debugging/#Debugging-performance-problems

odow avatar May 14 '25 01:05 odow

I am not sure we should close yet. I still think macros and this are very different things. I am thinking about counting allocations here, it might be useful to rank operation types.

joaquimg avatar May 16 '25 02:05 joaquimg

I don't know what the right approach is, but after thinking about this more I don't think that it's this PR.

odow avatar Jul 31 '25 23:07 odow