Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6623

Speed up DirectoryWatcher on OSX in developer mode

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 5.4.7, 5.5
    • 5.4.5
    • None
    • None
    • Yes
    • Kromeriz 45
    • 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.
      Note - due to changes brought in by the linked ticket, the system ACTUALLY does apply the new files when you refresh a page - you just do not get the log messages until later. So you dont feel in touch with the system, and you are confused that the log messages come later.

      When magnolia configuration "magnolia.develop" is true, the directory watcher should be speeded up, using the SensitivityWatchEventModifier if available.
      In my tests this works very nicely during development.
      (Tests on git branch feature/MAGNOLIA-6623-fast-dirwatch)

      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
      In 5.4.7 this feature is activated by adding a property to the properties file:
      magnolia.resources.watcher.sensitivity=high
      (other available values are "medium" and "low".)

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                jsimak Jaroslav Simak
                czimmermann Christopher Zimmermann
                Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 0.25h
                      0.25h