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

merger: don't create key_def/merger for one source #226

Merged

Conversation

Totktonada
Copy link
Member

@Totktonada Totktonada commented Oct 19, 2021

A merge source has the same API as merger itself, so there is no
difference in behaviour between a merger created from one source and
this source itself. However there is no overhead for creating key_def,
merger and passing tuples over the merger.

This optimization gives me 13% boost on the case from #220.

Follows up #220


There is no simple way to check it with a test, so I skipped it. Hopefully we'll see a difference after #225. I tested the patch manually for now.

@olegrok
Copy link
Contributor

olegrok commented Oct 19, 2021

typo: hehaviour -> behaviour

typo: opmimization -> optimization

@ligurio
Copy link
Member

ligurio commented Oct 19, 2021

We definitely need a performance regression test that allow us to avoid degradation in the future. If I get it right, we will address it in #225. Right?

Copy link
Member

@ligurio ligurio left a comment

Choose a reason for hiding this comment

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

LGTM

@Totktonada Totktonada force-pushed the Totktonada/skip-merger-creation-for-one-replicaset branch from 6304b54 to f7173b9 Compare October 19, 2021 14:20
@Totktonada
Copy link
Member Author

Fixed typos.

Copy link
Contributor

@olegrok olegrok left a comment

Choose a reason for hiding this comment

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

LGTM

A merge source has the same API as merger itself, so there is no
difference in behaviour between a merger created from one source and
this source itself. However there is no overhead for creating key_def,
merger and passing tuples over the merger.

This optimization gives me 13% boost on the case from #220.

Follows up #220
@Totktonada Totktonada force-pushed the Totktonada/skip-merger-creation-for-one-replicaset branch from f7173b9 to 54171b7 Compare October 19, 2021 19:09
@Totktonada Totktonada merged commit d029cd7 into master Oct 19, 2021
@Totktonada Totktonada deleted the Totktonada/skip-merger-creation-for-one-replicaset branch October 19, 2021 19:20
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