Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize Less_Visitor::visitObj for performance
All this small piece of code does are a few string manipulations. It's not very expensive. But called a lot. More than 800,000 times just when running the tests in this codebase. This adds up. Caching the strings in a map reduces the number of calls to how many classes actually exist: only 35. This is well visible in a profile. The relative "self" time spend in this method goes down from 13 to 8. The relative total time for this method goes down as well, from about 190 to 160. Bug: T381895 Change-Id: I10e0c23f72dc5f4babb38f3059716945f5177a4c
- Loading branch information