Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
docpad slow to notice changes in watched files #749
Docpad is slow to pick up changes to watched files. Previously a save almost immediately triggered a regeneration. Now it takes 3-9 seconds before Docpad notices the change and triggers a regeneration.
This occurs on a fresh DocPad install with only 1 document. No plugins installed.
It began around 6.55. I thought it related to the new database cache. But I've rolled back to 6.52 and the lag still remains. Have tested on my MacBook and a iMac at work. Perhaps either a change with Node, or a OS X Patch?
Docpad is a great tool, but the lag makes styling sites frustrating. Have tried adding preferredMethods watchFile and watch to docpad.coffee, but this only increases the delay.
Attached the log, but the times listed below were from an earlier run.
This is due to a recent fix in watchr that adds a 2 second catchup delay to detect swapfile changes accurately. Previously we would fire events right away, and have a 1 second duplicate delay for catching future events, however this could not detect swapfile changes accurately so was deprecated in favour of the new functionality.
If you use an editor that uses swapfiles, you can try reducing the delay via the
If you don't use swapfiles with your editor, you can disable the catchup delay by removing any watch configuration you have already set, and adding the following to your docpad configuration file:
This will make it so that watch events fire immediately, rather than trying to detect duplicate events and changes to swap files.
Let me know how it goes :)
referenced this issue
Jan 10, 2014
I added a FAQ entry to the documentation pointing to that issue: docpad/documentation@0bc8fc8#diff-712cbca5d8e6afa5b07e4e776e6c3da3R183
Hopefully that fixes helps other users in the future. :)
added a commit
Jan 20, 2014
Was getting the “regenerate on first change, then nothing” problem myself. Found this issue.
For @trooney and anyone else interested in speeding up performance:
The “official” template engine is usually
If you switch the plugins, remember to rename all your
Finally, here are some benchmarks that compare the performance of ECT to ECO.
Note: (Core) ECT includes some features beyond that of (core) ECO. However, these aren’t available in