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

Add cache to yamlCamera.makeCamera

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: obs_base, obs_lsst
    • Labels:
      None
    • Story Points:
      0.5
    • Team:
      Architecture
    • Urgent?:
      No

      Description

      Instantiating a yaml camera takes a long time (10 seconds for imsim on my Mac). This can cause significant slow downs if there are repeat calls to yamlCamera.makeCamera with the same yaml file. This is particularly noticeable in tests. Since the camera returned by makeCamera should be immutable, it makes sense to add an lru_cache decorator around that call. This should also allow the local caching to be removed from obs_lsst.

        Attachments

          Issue Links

            Activity

            Hide
            tjenness Tim Jenness added a comment -

            Simon Krughoff would you mind looking at this small change? I add one line to obs_base to cache yaml camera and remove the separate caches from gen2 and gen3 in obs_lsst.

            Show
            tjenness Tim Jenness added a comment - Simon Krughoff would you mind looking at this small change? I add one line to obs_base to cache yaml camera and remove the separate caches from gen2 and gen3 in obs_lsst.
            Hide
            krughoff Simon Krughoff added a comment -

            I have one small point of clarification in the obs_base PR.

            Show
            krughoff Simon Krughoff added a comment - I have one small point of clarification in the obs_base PR.

              People

              Assignee:
              tjenness Tim Jenness
              Reporter:
              tjenness Tim Jenness
              Reviewers:
              Simon Krughoff
              Watchers:
              Simon Krughoff, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  CI Builds

                  No builds found.