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

(fix) 修复时间轮算法多循环低效率问题 #927

Merged
merged 1 commit into from
Jan 30, 2023
Merged

(fix) 修复时间轮算法多循环低效率问题 #927

merged 1 commit into from
Jan 30, 2023

Conversation

1294566108
Copy link
Contributor

@1294566108 1294566108 commented Jan 28, 2023

Motivation:

原方法HashedWheelTimer#normalizeTicksPerWheel循环多次,方法执行时间不稳定,效率可能会偏低。

Modification:

使用java8 HashMap的相关实现来完善该算法

Result:

Fixes #926.

Copy link
Contributor

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

lgtm

@fengjiachun fengjiachun merged commit 9ac60dd into sofastack:master Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

时间轮算法可能出现低效率多循环问题
2 participants