Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 445 Bytes

Optimize_units_regex.md

File metadata and controls

14 lines (10 loc) · 445 Bytes

Optimize the regex used to match component values

  • Pull-request: #110
  • Opened: 2020-07-16 (updated 2020-07-18)
  • Status: Merged (2020-07-19)
  • Branch: optimize_units_regex

Description

The regex used in units.py is huge, applied to all components many times and compiled every time.

This patch uses a global variable to compile it once and reuse the compiled regex.