Shorten the life cycle of Timeout to get a better gc effect.#4040
Merged
chickenlj merged 1 commit intoapache:masterfrom May 17, 2019
Merged
Shorten the life cycle of Timeout to get a better gc effect.#4040chickenlj merged 1 commit intoapache:masterfrom
chickenlj merged 1 commit intoapache:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4040 +/- ##
============================================
+ Coverage 63.11% 63.13% +0.02%
- Complexity 564 565 +1
============================================
Files 753 753
Lines 32411 32417 +6
Branches 5143 5143
============================================
+ Hits 20455 20467 +12
+ Misses 9604 9600 -4
+ Partials 2352 2350 -2
Continue to review full report at Codecov.
|
Contributor
|
LGTM. |
chickenlj
approved these changes
May 14, 2019
chickenlj
approved these changes
May 17, 2019
| TimeoutCheckTask task = new TimeoutCheckTask(future); | ||
| TIME_OUT_TIMER.newTimeout(task, future.getTimeout(), TimeUnit.MILLISECONDS); | ||
| Timeout t = TIME_OUT_TIMER.newTimeout(task, future.getTimeout(), TimeUnit.MILLISECONDS); | ||
| PENDING_TASKS.put(future.getId(), t); |
Contributor
There was a problem hiding this comment.
Can we avoid this PENDING_TASKS instance? I think DefaultFuture itself hosts the status of its timeouttask or TIME_OUT_TIMER hosts the status of all timeout tasks can be better.
I need to merge this PR first to do some pressure test, please help to improve if possible.
6 tasks
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recently, some pressure tests were performed on the rpc inside the music163. I found that YGC did not perform well during the pressure measurement process. One of the reasons is that the lifetime of
TimeoutCheckTaskis relatively long (currently it will survivetimeout).I try to shorten its life cycle to get better GC performance. It seems that my modification is successful. Now
TimeoutCheckTaskwill be removed when the request returns.The purpose of this pr is to submit this optimization item to dubbo.