less / less/less.js

modifyVars really slow

Open
#2,966 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug medium priority
Dominant language
JavaScript
Stars
17k
Forks
3.4k
Avg merge
7h 42m
Merged PRs (30d)
26

Description

I apologize if this is not the right repo. I am using the less loader in webpack and I pass a lot of variables to modifyVars (almost 60). passing these variables dramatically decreases the performance. What I also noticed is that the performance degrade linearly to the number of variables modified. I really don't think it's a webpack problem, because what the less loader does is just construct the command to pass to less but if necessary I can try to do it with bare less directly

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by reproducing the slowdown with about 60 modifyVars entries through the Less loader, then compare it with bare Less as suggested; done means identifying and resolving the linear slowdown and demonstrating improved performance.

Written by the indexing model from the issue text.

Assessment

Tech stack
webpack
Domain
build-system, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.