- πΊπΈUnited States tbcs
Removing shell_exec version in most recent version as unlikely to seriously encounter a performance problem when configured correctly
Looking at code in src/Services/ScssCompiler.php
:
if (function_exists('shell_exec')) {
// Quick way to find more recent changed date in a directory.
$last_modification_date = strtotime(shell_exec("ls {$path_data['directory_path']}/{$this->settings->get('scss_directory')} -Artlan --time-style=+\"%Y-%m-%dT%H:%M:%S%z\" | tail -n 1 | awk -F ' ' '{print \$6}'"));
}
else {
$last_modification_date = scss_recursively_get_latest_modification_date("{$path_data['directory_path']}/{$this->settings->get('scss_directory')}");
}
- recursive scan done only when function_exists('shell_exec')
returns false, because ls
command miss -R
argument.
Maybe this better for performance, because users always can manually fill only needed folders to scan in SCSS settings, instead of always do recursive scan, that works much slower than scan one directory. So best solution is add checkbox "Execute recursive scan" in settings, with description "Works many times slower, than non-recursive scan".
Anyway, will be good to make both methods work in same way.
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Removing shell_exec version in most recent version as unlikely to seriously encounter a performance problem when configured correctly