Closed liferealized closed 12 years ago
The stable release is 1.1.5. The development version is 1.2.1.
Hmmm. Thanks. I wonder what version the twitter team is using to compile bootstrap.
I don't see a less.js version requirement in the bootstrap source. Can you please post the exact command and the file that produces the error?
Bootstrap version 2.0.2 need the 1.3 version of the less.js compiler, as stated here : http://www.markdotto.com/2012/03/12/bootstrap-2-0-2-released/
I just pushed 1.3.0 and if you have the time you can start testing it locally. The error reporting has changed since 1.1.5 and I'll need some more time to update the code on our side.
Hi, We've just upgrade to Bootstrap 2.0.2 but the keyword 'when' used in mixins.less is not supported by lesscss-engine
EDIT: after rebuilding the jar an other times it seems to works with Bootstrap 2.0.2 but the compile time is very slow. About 4x more time to compile files.
@JpEncausse Sorry to hear that the latest version is much slower. This can be related to the new Bootstrap or the new less.js. There's no much additional logic in this wrapper and I'm not sure I can help much. A faster Rhino alternative will of course help.
Do you reproduce the same behavior ? I made a workaround to recompile only the modified files. I try to dig to understand why there is so much gap between 2.0.1 and 2.0.2 of Bootstrap.
I'm not using Bootstrap but I can give it a try. Is the slowness observed after switching to version 1.3 of this project or after upgrading Bootstrap from 2.0.1 to 2.0.2?
I added some traces on my (fast) computer in fact it's only caused by all files:
[Rhino]: 38ms file:lib/bootstrap20/reset.less [Rhino]: 113ms file:lib/bootstrap20/variables.less [Rhino]: 630ms file:lib/bootstrap20/mixins.less [Rhino]: 6ms file:lib/bootstrap20/scaffolding.less [Rhino]: 2ms file:lib/bootstrap20/grid.less [Rhino]: 4ms file:lib/bootstrap20/layouts.less [Rhino]: 113ms file:lib/bootstrap20/type.less [Rhino]: 28ms file:lib/bootstrap20/code.less [Rhino]: 332ms file:lib/bootstrap20/forms.less [Rhino]: 157ms file:lib/bootstrap20/tables.less [Rhino]: 53ms file:lib/bootstrap20/dropdowns.less [Rhino]: 77ms file:lib/bootstrap20/buttons.less [Rhino]: 134ms file:lib/bootstrap20/button-groups.less [Rhino]: 362ms file:lib/bootstrap20/navs.less [Rhino]: 159ms file:lib/bootstrap20/navbar.less [Rhino]: 34ms file:lib/bootstrap20/modals.less [Rhino]: 3ms file:lib/bootstrap20/utilities.less [Rhino]: 2582ms file:lib/bootstrap20/bootstrap.less
Combined with my own files it takes time. I have the feeling it is caused by files that contains mixins. So there is nothing to do ...
Numbers like 2582ms doesn't look good. Unfortunately Rhino is much slower when compared to node. Did you test the same against Bootstrap 2.0.1? I don't know which version exactly introduced the dependency to less.js 1.3.0.
You can also try combining all the less sources in a single file and execute the processing only once. There should be some gain although I cannot guarantee that it will be dramatic.
The 2582ms of bootstrap.less is the addition of previous files duration called by @import. In a real life environment, on a laptop, with more modules, it takes 20s.
It's not a big deal because the compilation is done only when file changes. But it could be a pain for web designers.
This dependancy is introduced by bootstrap 2.0.2 that use the keyword 'when'
Very interesting ! according to my debug the duration with Bootstrap 2.0.1 and 1.4.0 was the same. This is very weird ! So we could say there is no issues with asual-less framework. It a little slow but no regression. My issue is comming from too many less @import . My apologies.
Bootstrap 201:
[Rhino]: 40ms file: lib\bootstrap201\reset.less [Rhino]: 40ms file: lib\bootstrap201\variables.less [Rhino]: 974ms file: lib\bootstrap201\mixins.less [Rhino]: 5ms file: lib\bootstrap201\scaffolding.less [Rhino]: 3ms file: lib\bootstrap201\grid.less [Rhino]: 4ms file: lib\bootstrap201\layouts.less [Rhino]: 101ms file: lib\bootstrap201\type.less [Rhino]: 19ms file: lib\bootstrap201\code.less [Rhino]: 371ms file: lib\bootstrap201\forms.less [Rhino]: 126ms file: lib\bootstrap201\tables.less [Rhino]: 640ms file: lib\bootstrap201\sprites.less [Rhino]: 41ms file: lib\bootstrap201\dropdowns.less [Rhino]: 5ms file: lib\bootstrap201\wells.less [Rhino]: 3ms file: lib\bootstrap201\component-animations.less [Rhino]: 4ms file: lib\bootstrap201\close.less [Rhino]: 68ms file: lib\bootstrap201\buttons.less [Rhino]: 106ms file: lib\bootstrap201\button-groups.less [Rhino]: 21ms file: lib\bootstrap201\alerts.less [Rhino]: 331ms file: lib\bootstrap201\navs.less [Rhino]: 141ms file: lib\bootstrap201\navbar.less [Rhino]: 5ms file: lib\bootstrap201\breadcrumbs.less [Rhino]: 18ms file: lib\bootstrap201\pagination.less [Rhino]: 6ms file: lib\bootstrap201\pager.less [Rhino]: 28ms file: lib\bootstrap201\modals.less [Rhino]: 15ms file: lib\bootstrap201\tooltip.less [Rhino]: 25ms file: lib\bootstrap201\popovers.less [Rhino]: 10ms file: lib\bootstrap201\thumbnails.less [Rhino]: 15ms file: lib\bootstrap201\labels.less [Rhino]: 70ms file: lib\bootstrap201\progress-bars.less [Rhino]: 6ms file: lib\bootstrap201\accordion.less [Rhino]: 43ms file: lib\bootstrap201\carousel.less [Rhino]: 3ms file: lib\bootstrap201\hero-unit.less [Rhino]: 3ms file: lib\bootstrap201\utilities.less = 3290ms
Bootstrap 140:
[Rhino]: 65ms file: lib\bootstrap140\reset.less [Rhino]: 44ms file: lib\bootstrap140\variables.less [Rhino]: 211ms file: lib\bootstrap140\mixins.less [Rhino]: 128ms file: lib\bootstrap140\scaffolding.less [Rhino]: 77ms file: lib\bootstrap140\type.less [Rhino]: 961ms file: lib\bootstrap140\forms.less [Rhino]: 173ms file: lib\bootstrap140\tables.less [Rhino]: 1820ms file: lib\bootstrap140\patterns.less = 3479ms
Are all these results produced with lesscss-engine 1.3.0? You can try older builds but if there is a performance regression then it very likely comes from changes in less.js itself.
The only thing that we can do at the moment is to experiment with projects like dyn.js which can potentially provide better JavaScript performance on the JVM. The next Rhino version may also be significantly faster thanks to some new Java 7 features.
Yes all are tested with latest version of lesscss-engine 1.3.0.
There is no performance issue,
Because I include mixins.less in many "plugins" each time it adds 974ms. That's why it was so slow.
Hi,
Is the latest version of less.js included with the lesscss engine? I am trying to use the engine in a project but am getting a single compile error when compiling the bootstrap less files.
Thanks, James