Skip to content

Conversation

@gregchapman-dev
Copy link
Owner

This should improve diff performance, removing a completely unnecessary deepcopy of every Note in the score.

…uld improve diff performance, removing a completely unnecessary deepcopy of every Note in the score.
@gregchapman-dev
Copy link
Owner Author

I'm honestly not sure how much performance is gained, but I was breaking into the debugger during a long diff, and almost every time was in deepcopy of a Note/Rest. We were so careful to only use ids in annotated objects, but this one snuck past. No-one uses it, except as a temporary during init, so I just stopped putting it in self. It's just a variable in init now.

@fosfrancesco
Copy link
Collaborator

Very good catch! I guess this will decrease the necessary memory a lot for long scores

@fosfrancesco fosfrancesco merged commit 5acd04e into main Mar 8, 2022
@gregchapman-dev gregchapman-dev deleted the gregc/noM21InAnnotatedObjects branch March 16, 2022 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants