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

[performance improvement] remove duplicate LoadShardList call #7380

Merged
merged 3 commits into from
Jan 10, 2024

Conversation

zhjwpku
Copy link
Contributor

@zhjwpku zhjwpku commented Dec 13, 2023

LoadShardList is called twice, which is not neccessary, and there is no need to
sort the shard placement list since we only want to know the list length.

LoadShardList is called twice, which is not neccessary, and there
is no need to sort the shard placement list since we only want to
know the list length.

Signed-off-by: Zhao Junwang <[email protected]>
Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Merging #7380 (8e49fc5) into main (1d55deb) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7380      +/-   ##
==========================================
+ Coverage   89.60%   89.62%   +0.01%     
==========================================
  Files         280      280              
  Lines       60304    60302       -2     
  Branches     7505     7505              
==========================================
+ Hits        54036    54043       +7     
+ Misses       4114     4109       -5     
+ Partials     2154     2150       -4     

@JelteF JelteF enabled auto-merge (squash) January 9, 2024 10:43
Copy link
Contributor

@JelteF JelteF left a comment

Choose a reason for hiding this comment

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

Thanks for this. These indeed look like clear improvements. Out of curiosity was the perf impact of these big enough for them to show up in a profile? Or did you simply find them when looking at the code?

@JelteF JelteF merged commit 8e979f7 into citusdata:main Jan 10, 2024
124 of 125 checks passed
@zhjwpku
Copy link
Contributor Author

zhjwpku commented Jan 10, 2024

Thanks for this. These indeed look like clear improvements. Out of curiosity was the perf impact of these big enough for them to show up in a profile? Or did you simply find them when looking at the code?

Just by looking the code, no perf ;(

@zhjwpku zhjwpku deleted the performance_improvement branch January 22, 2024 03:19
naisila pushed a commit that referenced this pull request Jan 12, 2025
LoadShardList is called twice, which is not neccessary, and there is no
need to sort the shard placement list since we only want to know the list
length.

(cherry picked from commit 8e979f7)
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.

2 participants