Page MenuHomePhabricator

lessphp performance is catastrophically bad
Closed, ResolvedPublic

Description

Despite assurances from some clown back in 2013 that "LESS support could be implemented in a manner that does not degrade performance", lessphp makes up fully 40% of load.php's CPU time, which is unacceptable.

We clearly have to be a lot more aggressive about caching. The difficulty is that lessphp compiles LESS sheets in a single pass, so there is no invariant intermediate representation that could be cached and reused.

https://github.com/oyejorge/less.php seems like a healthier project overall, has a lessc compatibility mode, and does support caching of parse trees. We should evaluate it.

Event Timeline

ori raised the priority of this task from to High.
ori updated the task description. (Show Details)
ori added a subscriber: ori.

Change 237730 had a related patch set uploaded (by Ori.livneh):
[WIP] Replace leafo/lessphp with oyejorge/less.php

https://gerrit.wikimedia.org/r/237730

Change 237751 had a related patch set uploaded (by Ori.livneh):
leafo/lessphp 0.5.0 → oyejorge/less.php 1.7.0.5

https://gerrit.wikimedia.org/r/237751

Change 239350 had a related patch set uploaded (by Gilles):
Fix IE9 CSS hack

https://gerrit.wikimedia.org/r/239350

Change 237730 merged by Ori.livneh:
Replace leafo/lessphp with oyejorge/less.php

https://gerrit.wikimedia.org/r/237730

Change 237751 merged by Ori.livneh:
leafo/lessphp 0.5.0 → oyejorge/less.php 1.7.0.5

https://gerrit.wikimedia.org/r/237751

This comment was removed by Paladox.

Change 240316 had a related patch set uploaded (by Ori.livneh):
Improved caching for LESS file compilation

https://gerrit.wikimedia.org/r/240316

Change 240450 had a related patch set uploaded (by Ori.livneh):
Improved caching for LESS file compilation

https://gerrit.wikimedia.org/r/240450

Change 240450 merged by Ori.livneh:
Improved caching for LESS file compilation

https://gerrit.wikimedia.org/r/240450

Change 240316 merged by jenkins-bot:
resourceloader: Improve caching for LESS file compilation

https://gerrit.wikimedia.org/r/240316

ori claimed this task.