RFR: 8285956: (fs) Excessive default poll interval in PollingWatchService

Brian Burkhalter bpb at openjdk.java.net
Mon May 2 22:01:18 UTC 2022


On Mon, 2 May 2022 21:16:06 GMT, Tyler Steele <duke at openjdk.java.net> wrote:

> > Could you perhaps test it with something a bit less aggressive than 1s, perhaps 5s? Thanks.
> 
> Are you meaning to suggest a different default value? I recognize that my choice of 1s is arbitrary, and can change it if desired. My thinking is that 1s is quite long to a computer, and shouldn't cause too much additional load. In addition, anything more than 2s or so is a pretty long time for a 21st century human to wait. So either 1 or 2 seconds should be the sweet spot.
> 
> Testing with initial interval of 5s yields 6.44s with my development test.

Yes, I was thinking of a different default value. Subjectively 6.44s does seem rather slow however. I know this is hard to measure in any kind of rigorous way, and the current 10s is really bad. I think the concern would be if there were many simultaneous watch services with frequent polling causing an overall performance degradation.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8479


More information about the nio-dev mailing list