From larry.cable at oracle.com Mon Sep 5 19:39:17 2022 From: larry.cable at oracle.com (Laurence Cable) Date: Mon, 5 Sep 2022 12:39:17 -0700 Subject: Any interest in WatchService based on MacOS FSEvents? In-Reply-To: References: Message-ID: <10bf433a-b427-3582-bcc6-de537f840c85@oracle.com> On 8/29/22 11:50 PM, Maxim Kartashev wrote: > WatchService on MacOS is still implemented by the generic > PollingWatchService, which continuously re-scans the directory > consuming CPU, introduces large latencies to the generated > WatchEvent's, and misses changes that occur faster than the re-scan > interval. At the same time, there are two technologies available on > the platform to receive the necessary information from the OS similar > to what is available on Windows and Linux: Kernel Queues and File > System Events, the latter being more suitable for implementing the > WatchServie functionality. > > There are several stand-alone implementations out there that utilize > one or the other (or even both), which suggests that demand exists for > WatchService on MacOS to be more responsive and less resource-hungry. > > If the community is interested in getting this functionality in > OpenJDK proper, I'd be happy to contribute code that was developed, > tested, and used at JetBrains for around half a year. It is based on > FSEvents, supports the FILE_TREE modifier (recursive directory watch), > and does not do any excessive I/O except the necessary minimum. > totally! > References > * WatchService interface > ? - > https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/nio/file/WatchService.html > * PollingWatchService source code > ? - > https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/sun/nio/fs/PollingWatchService.java > * File System Events > ? - > https://developer.apple.com/documentation/coreservices/file_system_events?language=objc > * Kernel Queues > ? - > https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/FSEvents_ProgGuide/KernelQueues/KernelQueues.html From ethan at mccue.dev Sat Sep 17 04:06:58 2022 From: ethan at mccue.dev (Ethan McCue) Date: Sat, 17 Sep 2022 00:06:58 -0400 Subject: Who has the power to make a "Latest" docs link? Message-ID: The problem here is pretty simple. If someone googles Javadocs for a class or method, they will end up on a page pointing to a specific version. https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/util/concurrent/atomic/AtomicReference.html Now that releases are way more frequent, there isn't much time for any particular version to gather SEO traffic. As such, the links that show up in search results for any particular class are often for Java 8. https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html No matter what it will take quite a while for this to change, but part of the solution the rust community adopted for crates was to make a "/latest" link. There are more steps to this I'm sure and it's not a comprehensive strategy, but it seems like a good first step. https://github.com/rust-lang/docs.rs/issues/1438 So in this case https://docs.oracle.com/en/java/javase/latest/docs/api/java.base/java/util/concurrent/atomic/AtomicReference.html -------------- next part -------------- An HTML attachment was scrubbed... URL: