[MAGNOLIA-6623] Speed up DirectoryWatcher on OSX in developer mode Created: 04/Apr/16 Updated: 09/Feb/17 Resolved: 25/May/16 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 5.4.5 |
| Fix Version/s: | 5.4.7, 5.5 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Christopher Zimmermann | Assignee: | Jaroslav Simak |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 0.25h | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Template: |
|
||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||
| Documentation update required: |
Yes
|
||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||
| Sprint: | Kromeriz 45 | ||||||||||||||||||||
| Story Points: | 3 | ||||||||||||||||||||
| Description |
|
With the default DirectoryWatcher on OSX, the system typically takes around 5 seconds to notice the changes and report to the console, but sometimes up to 9 seconds has been observed. This delay frustrates, slows down, and gives developers less confidence in Magnolia. Particularly with our emphasis, and frontend deveopers emphasis on speed. People have told me directly that they abandonded developing against magnolia because it appeared slow in general in contrast to the instant turnaround of developing against a frontend build system. With the conference coming up with lots of workshops and demos, and a lot of focus from the community on this feature, it would make light development more convincing if this improvement was made. When magnolia configuration "magnolia.develop" is true, the directory watcher should be speeded up, using the SensitivityWatchEventModifier if available. If there is some technical risk - such as the JVM core dump Jan mentions, then activate this feature with a new config property. Such as "magnolia.develop.fastresources". See linked ticket for an implementation in a test class. Implemented |
| Comments |
| Comment by Jan Haderka [ 04/Apr/16 ] |
|
Also note that it tends to cause intermittent JVM core dumps when used on Magnolia 5.4.5. on java version "1.8.0_65" Java(TM) SE Runtime Environment (build 1.8.0_65-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode) If you manage to request resource before it is reloaded. |
| Comment by Maxime Michel [ 10/May/16 ] |
|
Excellent, thanks for making this happen. I vote for having this in - even as an experimental new config property. I will toy with it ASAP, but if it fixes the last remaining hiccups I was seeing when working on the Gulp live reload setup, then it's going to be a great asset for light development and showcases. |
| Comment by Michael Mühlebach [ 10/May/16 ] |
|
Instead of having it just on a branch directly on the main level could you move it to featues/... and create a pull request. Helps to continue on this work. |
| Comment by Christopher Zimmermann [ 10/May/16 ] |
|
OK - recreated branch with new name. Created https://git.magnolia-cms.com/projects/PLATFORM/repos/main/pull-requests/160/overview |
| Comment by Maxime Michel [ 11/May/16 ] |
|
On my setup this doesn't seem to be making any improvement, actually. |
| Comment by Christopher Zimmermann [ 11/May/16 ] |
|
It should improve speed of YAML def pickup. Or does it not improve that? |
| Comment by Christopher Zimmermann [ 12/May/16 ] |
|
I won't close this yet - but I've just learned that the symptoms of slow loading of YAML changes are now gone in 5.4.7 and 5.5 due to |
| Comment by Christopher Zimmermann [ 12/May/16 ] |
|
I still think we should make this improvement for the sake of the log messages which are a useful indicator to developers that the changes have been successfully registered. But this is a less important reason that the original problem of the system being slow to display the changes. |
| Comment by Martin Drápela [ 01/Jul/16 ] |
|
Added the magnolia.resources.watcher.sensitivity property to the list at https://documentation.magnolia-cms.com/display/DOCS/Configuration+management#Configurationmanagement-Definingproperties (An includable page explaining the property also exists now.) |