Zones are needed 2 or 3 times in the process (applies(), apply()), but they are instantiated from scratch each time, which isn't free, especially in EuropeanUnionVat which has many. Let's put them behind a static cache. EuropeanUnionVat can also cut down on the number of t() calls since most strings are the same.

Comments

bojanz created an issue. See original summary.

  • bojanz committed b511b30 on 8.x-2.x
    Issue #2880485 by bojanz: Optimize TaxType::getZones()
    
bojanz’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.