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

Add sourceCatalog method for adding multiple empty records

    XMLWordPrintable

Details

    • Improvement
    • Status: Invalid
    • Resolution: Done
    • None
    • afw
    • 2

    Description

      Currently, to add multiple new empty records to a sourceCatalog requires multiple calls to catalog.addNew(), which can result in the catalog being non-contiguous in memory. It would be much better to have an catalog.addNew(size_t N) method that creates N new elements at once, all contiguous.

      Whether this is best done via an overload of addNew or a new method, I leave to the implementer.

      Attachments

        Issue Links

          Activity

            price Paul Price added a comment - - edited

            Workaround:

            catalog.reserve(num)
            for ii in range(num):
                catalog.addNew()
            

            price Paul Price added a comment - - edited Workaround: catalog.reserve(num) for ii in range(num): catalog.addNew()
            tjenness Tim Jenness added a comment -

            What do we want to do with this old ticket? Is the workaround from price sufficient?

            tjenness Tim Jenness added a comment - What do we want to do with this old ticket? Is the workaround from price sufficient?
            erykoff Eli Rykoff added a comment -

            This has been fixed at some point, there was a resize method which does this exact operation. How do we mark this ticket then?

            erykoff Eli Rykoff added a comment - This has been fixed at some point, there was a resize method which does this exact operation. How do we mark this ticket then?
            erykoff Eli Rykoff added a comment -

            Added with DM-19461.

            erykoff Eli Rykoff added a comment - Added with DM-19461 .

            People

              Unassigned Unassigned
              Parejkoj John Parejko
              Eli Rykoff, Jim Bosch, John Parejko, John Swinbank, Paul Price, Russell Owen, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.