Comments (10)
Unless I'm mistaken this sensitivity parameter is only relevant when the watch service falls back to polling mode, which should not be the case when barbarywatchservice is in place. Moving from FSEvent handler to polling would put more load on the CPU, which we'd like to avoid if possible.
Do you see this behavior always? Can you please make this simple test:
$ mkdir src
$ boot -s src watch -v show -e
then, in another terminal do
$ touch src/foo
$ touch src/foo
Does it still take a couple of seconds to see the watcher update?
from boot.
Unless I'm mistaken this sensitivity parameter is only relevant when the watch service falls back to polling mode, which should not be the case when barbarywatchservice is in place.
You might be right. I was referring to completely removing barbarywatchservice
as when using the sensitivity parameter performance is good enough even if it is relying on polling.
I also noticed barbarywatchservice
creates one thread per watched folder (including boot temp ones) which might be an issue if you have a large number of folders? Also this library seems abandoned.
I didn't have any significant latency doing your test so there must be something else going on. I will investigate further.
Thanks!
from boot.
How does the CPU utilization when you increase the sensitivity to the maximum and fall back to polling mode compare to the barbarysoftware fsevent implementation? With boot1 polling used too much CPU, but we didn't have access to the watchservice (this was java 1.6).
from boot.
I've been using this in a custom build on a significant project (a dozen folder, a hundred clj/cljs/cljx files) for the last couple months and CPU usage has never been an issue. I always have sub-second cljs recompilation for instance.
I didn't try with boot but I don't see how it could be different.
from boot.
I did some more experimentation on this and finally thinks this would be worth removing barbaryservice. You can find relevant changes in my fork.
I believe it is worth because:
- changes are picked up faster on my system and overall boot feels faster
- it removes all those useless threads
- no more dependency on a frozen project
- ClojureScript rely on the same logic
I did some tests on a project with more than 100 source files and performance are pretty good and CPU usage quite low.
Would you consider a PR?
from boot.
I can't find anyone else on OSX who experiences the delay you're reporting, so I'm hesitant to make this change. Is it possible that there is something about your system that's causing the issue?
from boot.
I understand your reluctancy given the potential impact it has. Still I think this patch would makes sense even without perf improvement as current implementation can be considered a workaround.
As a first step some configuration could be introduced to easily switch to the native implementation while still defaulting to the current one.
What do you think?
from boot.
I think I like it :)
We should be able to add a flag somewhere, (maybe a system property?) and just fall through to the Java watch service if the flag is set. If we can do this without disturbing the existing logic then I think we should, but if we need to make changes to the logic then I'd be more skeptical, because what we have there currently is the product of a lot of hard-won workarounds for different weird bugs.
from boot.
Great! I'll let you know how that works but it will probably take me some time.
from boot.
I now switched to a linux machine and don't have this issue anymore. I will close this issue for now as it seems no other OSX user were experiencing this.
from boot.
Related Issues (20)
- Cut a new release HOT 1
- Respect nREPL's config file
- Cannot compile Boot on Java 10/11/12 HOT 1
- Lein to Boot HOT 1
- Pushing an artifact on 2.8.3 fails with java.lang.NoSuchMethodError: org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.getBufferCapacityForTransfer(J)I HOT 10
- List only project tasks instead of whole tasks and help message HOT 1
- Fails completely on MacOS 10.14.1 HOT 2
- Boot-generated uberjar zip file has corrupted content on Java 13 HOT 1
- Ubuntu 19.10 - 'an illegal reflective access operation has occurred' HOT 2
- Could not locate class HOT 2
- IPv6 support missing in boot
- NullPointerException when trying to run shebang boot script on macOS HOT 5
- Fails to start on NetBSD 9.0RC1
- Unable to install v2.8.2 on MacOS HOT 3
- Prefix string too short HOT 2
- Possibly out of date documentation about nrefactor repl
- java.lang.NullPointerException on boot repl -c HOT 1
- Boot doesn't work on macOS Big Sur HOT 20
- Boot executable refers to invalid web site boot-clj.com HOT 1
- Creating a binary executable from a Clojure script
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boot.