Skip to content

Conversation

peterfpeterson
Copy link
Member

@peterfpeterson peterfpeterson commented Sep 30, 2024

This change will save memory because the underlying vectors of events that aren't used will be nullptr rather than vector of default capacity.

This also moves two cppcheck suppressions to be inline (they'll never go away) and fixes the others in DataObjects::EventList.

There is no associated issue, but this is associated with EWM7462

To test:

This is a refactor to be more efficient in releasing memory. The changes to EventListTest add more checks which aided in tracking down nullptr dereferencing errors.

This does not require release notes because it is an isolated code refactor. There should be very little difference to the user other than less memory is used by EventWorkspaces with many spectra.


Reviewer

Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.

Code Review

  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Do the release notes conform to the release notes guide?

Functional Tests

  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

Gatekeeper

If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.

@peterfpeterson peterfpeterson added the Maintenance Unassigned issues to be addressed in the next maintenance period. label Sep 30, 2024
@peterfpeterson peterfpeterson added this to the Release 6.12 milestone Sep 30, 2024
@peterfpeterson peterfpeterson force-pushed the event_unique_ptr branch 5 times, most recently from 19e3ef5 to 88d9b7b Compare September 30, 2024 19:40
@peterfpeterson peterfpeterson marked this pull request as ready for review October 1, 2024 13:40
Copy link

github-actions bot commented Oct 2, 2024

👋 Hi, @peterfpeterson,

Conflicts have been detected against the base branch. Please rebase your branch against the base branch.

@github-actions github-actions bot added the Has Conflicts Used by the bot to label pull requests that have conflicts label Oct 2, 2024
This change will save memory because the underlying vectors of events
that aren't used will be nullptr rather than vector of default capacity.
@peterfpeterson peterfpeterson removed the Has Conflicts Used by the bot to label pull requests that have conflicts label Oct 2, 2024
@github-actions github-actions bot added the Has Conflicts Used by the bot to label pull requests that have conflicts label Oct 2, 2024
Copy link

github-actions bot commented Oct 2, 2024

👋 Hi, @peterfpeterson,

Conflicts have been detected against the base branch. Please rebase your branch against the base branch.

@peterfpeterson peterfpeterson removed the Has Conflicts Used by the bot to label pull requests that have conflicts label Oct 2, 2024
@SilkeSchomann SilkeSchomann self-assigned this Oct 3, 2024
@SilkeSchomann SilkeSchomann merged commit 4185c8c into mantidproject:main Oct 3, 2024
10 checks passed
@peterfpeterson peterfpeterson deleted the event_unique_ptr branch October 3, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Unassigned issues to be addressed in the next maintenance period.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants