Skip to content

Auto compile to slow  #311

@danyj

Description

@danyj

I used your instructions for autocompile as advised here

http://leafo.net/lessphp/docs/#compiling_automatically since checkedCompile only checks the master less file and none of the @import ones.

The issue is that when you are importing all bootstrap files ( 38 imports ) the page load increases tremendously since the compile must check for all of them on every page load in order to generate/not generate the css file ,

It is ok if you have 4-5 import files but bootstrap is killing it.

is there any faster way ?

I tried both

this

$cache          = $less->cachedCompile($input_less);
file_put_contents($output_css, $cache["compiled"]);
$last_updated   = $cache["updated"];
$cache          = $less->cachedCompile($cache);

if ($cache["updated"] > $last_updated) {
    file_put_contents($output_css, $cache["compiled"]);
}

and your autoCompileLess()

it takes up to 10-15 sec on each page load , whereas checkedCompile does this only once until it is changed again.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions