juanfran / gulp-jade-inheritance

Gulp plugin to rebuild jade files and other files that have extended or included those files
34 stars 32 forks source link

The usefulness of the "changed" plugin #2

Open ghost opened 9 years ago

ghost commented 9 years ago

Hi Juan!

Could you explain more clearly the usefulness of the "changed" plugin?

What would be the purpose? Why would anyone want to monitor the files that have been compiled?

//only pass unchanged *main* files and *all* the partials
.pipe(changed('dist', {extension: '.html'}))

Thank you for publishing this package :)

juanfran commented 9 years ago

Hi @joelcipriano

it is for performance, if your project has dozens of .jade the compilation could take too long

ghost commented 9 years ago

Sorry @juanfran, but I still do not understand. If only .jade files are monitored for changes, why listening .html files that already have been compiled?

juanfran commented 9 years ago

bacause gulp-changed checks the last modified date, if example.html is less recent than example.jade then gulp-changed pass through example.jade

sorry if I haven't explained well

ghost commented 9 years ago

Ok. Got it!

Have you tested with more than 100 files? I used this solution in a project with 62 pages and 108 includes. The CPU usage hit the sky and the compilation stopped working :/

juanfran commented 9 years ago

at the beginning or after a change? I have a project with many files too and it works well https://github.com/taigaio/taiga-front/blob/master/gulpfile.js

siliconalchemy commented 8 years ago

This has gone a little off-topic, but I get the same 'hanging'. Using gulp-changed works fine for me, that's not an issue. But if I use jade-inheritance on watched include files, which triggers recompile of 65 jade files it takes several minutes and hangs gulp at 100% cpu. Most of that time is spent in futex by an strace.