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

Reduce usage of MeasurementError in SdssCentroid

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: meas_base
    • Labels:
      None
    • Story Points:
      2
    • Team:
      Architecture
    • Urgent?:
      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

            Hide
            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.

             

             

            Show
            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.    
            Hide
            jbosch Jim Bosch added a comment -

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

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

            I made your change and Jenkins is running.

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

              People

              Assignee:
              tjenness Tim Jenness
              Reporter:
              tjenness Tim Jenness
              Reviewers:
              Jim Bosch
              Watchers:
              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.