In my opinion, it's perfectly fine to use HashedWheelTimer. -Ian.
On Thu, Jan 24, 2019 at 10:09 AM 徐靖峰 <[email protected]> wrote: > Hi, Jason,a nice opinion. > > I have noticed that this issue[1] in Github encourage the change from > Schedule to HashedWheelTimer, but didn’t give a vert detailed reason. > > Is HashedWheelTimer really an unquestionable choice? > > [1] https://github.com/apache/incubator-dubbo/issues/1371 < > https://github.com/apache/incubator-dubbo/issues/1371> > > > 在 2019年1月24日,上午9:53,Jason Joo <[email protected]> 写道: > > > > Maybe because the main scenario dubbo faces is persistent connection. > > For persistent connections the most frequent thing is ticking. > > > > ScheduledThreadPoolExecutor is O(1)*connections compared to O(C) in > HashedWheelTimer when ticking. > > Considering connections is far less then C ScheduledThreadPoolExecutor > maybe more efficient in my opinion. > > > > best regards, > > > > Jason > >
