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 created this task.Sep 10 2015, 12:38 AM
ori updated the task description. (Show Details)
ori raised the priority of this task from to High.
ori added a subscriber: ori.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 10 2015, 12:38 AM
Krinkle added a subscriber: Krinkle.
ori moved this task from Inbox to Doing on the Performance-Team board.Sep 10 2015, 7:32 PM

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

Paladox set Security to None.Sep 11 2015, 9:12 PM
Paladox added a subscriber: Paladox.

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 239350 merged by jenkins-bot:
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 closed this task as Resolved.Sep 24 2015, 6:26 PM
ori claimed this task.