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

[Improvement] Replace putIfAbsent with computeIfAbsent in some critical paths #493

Closed
2 of 3 tasks
zuston opened this issue Jan 17, 2023 · 4 comments · Fixed by #876
Closed
2 of 3 tasks

[Improvement] Replace putIfAbsent with computeIfAbsent in some critical paths #493

zuston opened this issue Jan 17, 2023 · 4 comments · Fixed by #876
Assignees
Labels
good first issue Good for newcomers

Comments

@zuston
Copy link
Member

zuston commented Jan 17, 2023

Code of Conduct

Search before asking

  • I have searched in the issues and found no similar issues.

What would you like to be improved?

This problem is mentioned by previous PR #481 (comment).

The invoking of putIfAbsent will always call its value if it's a time-consuming operation. So we'd better replace putIfAbsent with computeIfAbsent in some critical paths.

How should we improve?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@zuston zuston added the good first issue Good for newcomers label Jan 17, 2023
@advancedxy
Copy link
Contributor

#519 these two issues should be considered together

@Pushkarmondal
Copy link

is this issue resolved?
Hey how can I contribute to this ?

@cchung100m
Copy link
Collaborator

Hi @zuston

I'd like to handle this issue if you agreed. Thank you.

@zuston
Copy link
Member Author

zuston commented May 11, 2023

@cchung100m Assigned. Thanks in advance

cchung100m added a commit to cchung100m/incubator-uniffle that referenced this issue May 11, 2023
cchung100m added a commit to cchung100m/incubator-uniffle that referenced this issue May 12, 2023
cchung100m added a commit to cchung100m/incubator-uniffle that referenced this issue May 12, 2023
zuston pushed a commit that referenced this issue May 13, 2023
…void performance loss in some critical paths (#876)

### What changes were proposed in this pull request?

Replace `putIfAbsent` with `computeIfAbsent` in some critical paths

### Why are the changes needed?

Fix: #493 

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

current UT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
4 participants