Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We have a lot of less, it compiles to 300 + 400 kb css files.
Compilation takes 20-25 seconds.
I switched from lessphp to less.js (and fixed issue with relative urls) and profiled compilation.
I found that compilation actually takes only 8-10 seconds and then 10-15 seconds spends for build dependencies for watch source files changes.
Dependencies rebuilds at every less compilation, but files don't adds or removes frequently.
I think that rebuild dependencies only after cache clear will be enough. It speeds up less rebuild at 50-70%.
Comment | File | Size | Author |
---|---|---|---|
#2 | less-dependencies_cache-2851608-2.patch | 1.54 KB | popstas |
|
Comments
Comment #2
popstas CreditAttribution: popstas commentedAfter this patch cache 'less:devel:file_hash' don't rebuild after each less compilation.
If any of dependencies will modified, it timestamp will be updated in cache.
If developer want to add or remove file to less tree, he should clear cache for rebuild dependencies cache.
It don't affect to lessphp compiler because in it compilation and build dependencies list is single operation.
Tested with 7.x-4.0
Comment #4
popstas CreditAttribution: popstas commented