Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-35265

Reduce usage of MeasurementError in SdssCentroid

    XMLWordPrintable

Details

    • Story
    • Status: Done
    • Resolution: Done
    • None
    • meas_base
    • None
    • 2
    • Architecture
    • No

    Description

      DM-35206 showed that exception handling in measurement plugins is not very efficient on some architectures and is generally thought of as being a bad idea for flow control.

      meas_extensions_trailedSources uses SdssCentroid in its tests and this can be very slow on M1 architectures.

      This ticket is to reduce the usage of MeasurementError in SdssCentroid to improve performance.

      Attachments

        Issue Links

          Activity

            tjenness Tim Jenness added a comment - - edited

            I have reworked all the code in meas_base to use flags rather than raising MeasurementError.

            Here are the timings of a single meas_extensions_trailedSources:testMonteCarlo before and after this ticket branch:

              Jenkins Linux Jenkins macOS Intel macOS M1
            Initial (s) 15 20 75
            Using Flags 15 17 15.5

            Linux does not seem to notice any improvement but there has been a slight improvement on Intel macOS and now M1 is competitive. A profile on macOS M1 now shows no hotspot.

             

             

            tjenness Tim Jenness added a comment - - edited I have reworked all the code in meas_base to use flags rather than raising MeasurementError. Here are the timings of a single meas_extensions_trailedSources:testMonteCarlo before and after this ticket branch:   Jenkins Linux Jenkins macOS Intel macOS M1 Initial (s) 15 20 75 Using Flags 15 17 15.5 Linux does not seem to notice any improvement but there has been a slight improvement on Intel macOS and now M1 is competitive. A profile on macOS M1 now shows no hotspot.    
            jbosch Jim Bosch added a comment -

            Looks good! Only comment is a suggestion for getting rid of the remaining try/catch on LengthError.

            jbosch Jim Bosch added a comment - Looks good! Only comment is a suggestion for getting rid of the remaining try/catch on LengthError.
            tjenness Tim Jenness added a comment -

            I made your change and Jenkins is running.

            tjenness Tim Jenness added a comment - I made your change and Jenkins is running.

            People

              tjenness Tim Jenness
              tjenness Tim Jenness
              Jim Bosch
              Eli Rykoff, Jim Bosch, Nate Lust, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.