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

[master < T1266] Improve deserialization performance #1266

Merged
merged 7 commits into from
Sep 20, 2023
Merged

Conversation

as51340
Copy link
Contributor

@as51340 as51340 commented Sep 18, 2023

Preparation query:

UNWIND range(1, 100000) as u CREATE (n:Node {string: "test"}) RETURN n;

Before optimization:

MATCH (n) RETURN n;

Ran 5 times, avg. is: 0.5718

After:

MATCH (n) RETURN n;

Ran 5 times, avg. is: 0.3094

Conclusion: Roughly this PR gives 2x faster data deserialization from disk. Loading all edges isn't improved because the cost comes from different place.

[master < Epic] PR

  • Check, and update documentation if necessary
  • Write E2E tests
  • Compare the benchmarking results between the master branch and the Epic branch
  • Provide the full content or a guide for the final git message

[master < Task] PR

  • Check, and update documentation if necessary
  • Provide the full content or a guide for the final git message

To keep docs changelog up to date, one more thing to do:

  • Write a release note here, including added/changed clauses
  • Tag someone from docs team in the comments

@as51340 as51340 added the feature feature label Sep 18, 2023
@as51340 as51340 added this to the mg-v2.12.0 milestone Sep 18, 2023
@as51340 as51340 requested a review from Darych September 18, 2023 11:03
@as51340 as51340 self-assigned this Sep 18, 2023
@as51340 as51340 changed the title [master < ] Improve deserialization performance [master < T1266] Improve deserialization performance Sep 18, 2023
@as51340 as51340 linked an issue Sep 18, 2023 that may be closed by this pull request
@as51340 as51340 marked this pull request as ready for review September 18, 2023 13:58
src/storage/v2/id_types.hpp Outdated Show resolved Hide resolved
src/storage/v2/mvcc.hpp Outdated Show resolved Hide resolved
@as51340 as51340 requested a review from Darych September 19, 2023 06:09
Copy link
Contributor

@Darych Darych left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@as51340 as51340 merged commit 1553fcb into master Sep 20, 2023
6 checks passed
@as51340 as51340 deleted the from-chars branch September 20, 2023 12:25
@as51340 as51340 added Docs unnecessary Docs unnecessary Docs - changelog only Docs - changelog only labels Sep 21, 2023
@as51340
Copy link
Contributor Author

as51340 commented Sep 21, 2023

Release note: The reading performance of vertices has been improved 2x for disk storage.

@as51340 as51340 removed the Docs unnecessary Docs unnecessary label Sep 21, 2023
@vpavicic
Copy link
Contributor

Reading of nodes stored on disk is now 2x faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs - changelog only Docs - changelog only feature feature
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Change std::stoull to std::from_chars for performance reasons
3 participants