Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the performance of project serialization by ~10x #2065

Merged
merged 1 commit into from Nov 2, 2021

Conversation

crsib
Copy link
Member

@crsib crsib commented Nov 1, 2021

Originally, wxMemoryBuffer was used while generating binary XML data. wxMemoryBuffer grows only by 1Kb, which results in extremely low performance of project serialization (few seconds on Ryzen 5800x for a 100Mb XML file).

This commit introduces a MemoryStream class tuned for high performance and low memory fragmentation.

This issue is related to #2051 but is definitely not enough to fix it.

(short description of the changes and the motivation to make the changes)

  • I signed CLA
  • The title of the pull request describes an issue it addresses
  • If changes are extensive, then there is a sequence of easily reviewable commits
  • Each commit's message describes its purpose and effects
  • There are no behavior changes unnecessary for the stated purpose of the PR

Recommended:

  • Each commit compiles and runs on my machine without known undesirable changes of behavior

Originally, wxMemoryBuffer was used while generating binary XML data. wxMemoryBuffer grows only by 1Kb, which results in extremely low performance of project serialization (few seconds on Ryzen 5800x for a 100Mb XML file).

This commit introduces a MemoryStream class tuned for high performance and low memory fragmentation.
@crsib crsib requested review from Paul-Licameli and vsverchinsky Nov 1, 2021
@crsib crsib added this to In progress in Sprint 8 - 3.1 Stabilisation via automation Nov 1, 2021
@vsverchinsky vsverchinsky moved this from In progress to Review in progress in Sprint 8 - 3.1 Stabilisation Nov 1, 2021
Sprint 8 - 3.1 Stabilisation automation moved this from Review in progress to Reviewer approved Nov 1, 2021
Copy link
Collaborator

@vsverchinsky vsverchinsky left a comment

Great improvement overall, though MemoryStream might seem to be a very generic title for solving quite a specific issue, isn't it? I'd suggest moving it under the ProjectSerializer scope.

@crsib crsib merged commit 1987d78 into audacity:release-3.1.1 Nov 2, 2021
4 checks passed
Sprint 8 - 3.1 Stabilisation automation moved this from Reviewer approved to Ready for QA Nov 2, 2021
@crsib crsib deleted the 2051_serialization branch Nov 2, 2021
@Penikov Penikov moved this from Ready for QA to In QA in Sprint 8 - 3.1 Stabilisation Nov 8, 2021
@Penikov Penikov moved this from In QA to Done in Sprint 8 - 3.1 Stabilisation Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants