나는 파일 변경을 감지하고 작업을 시작하는 사이에 매우 큰 지연이있는 것으로 보이는 잡아보기 작업이 있습니다. 다음과 같은그란트 시계 - 긴 지연
출력은 일반적입니다 : 여기
>> File "src/static/app/brandManager/addChannel.html" changed.
Running "html2js:main" (html2js) task
Successfully converted 13 html templates to js.
Done, without errors.
Execution Time (2014-02-11 01:38:27 UTC)
loading tasks 101ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 17%
html2js:main 495ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 83%
Total 597ms
... Reload src/static/app/brandManager/addChannel.html ...
Completed in 14.469s at Tue Feb 11 2014 12:38:28 GMT+1100 (EST) - Waiting...
, 우리는 실제 작업은 597ms
했다 것을 볼 수 있지만 전체 작업은 14.469s
에 출마했다.
여기 내 Gruntfile에서 관련 조각입니다 :
src: {
js: ['src/static/app/**/*.js', '!src/static/app/**/*.spec.js'],
},
watch: {
js: {
files: ['<%= src.js %>'],
tasks: ['fileblocks','newer:jshint:all'],
options: {
livereload: false
}
},
livereload: {
options: {
livereload: '<%= connect.options.livereload %>'
},
files: [
'<%= src.html %>',
'.tmp/styles/{,*/}*.css',
'<%= src.assets %>'
]
}
}
호출 한보고 대상 문제가 표시되지 않습니다, 지연이 항상있다. 지연 시간은 일정하지 않습니다 (5 초에서 60 초 사이 (평균 15-20 초)).
이것은 내 js vibe를 정말 흥분시키고 있습니다. 원인을 디버깅하려면 어떻게해야합니까?
편집 :
감시 당하고 파일의 수는 작은 아니지만, 그것은 거대한에서 멀리이다:
--- static/app ‹master› find -f . | wc -l
>> 51
Linux를 사용하십니까? – SomeKittens
그래, 나는 리눅스에서 파이썬으로 변화를 지켜 보는 것과 같은 종류의 지연을 보았다. – jeremyjjbrown
@ SomeKittensUx2666 Mac OS X에 있습니다 –