Delay many re.compile calls.

Review Request #3122 - Created Nov. 14, 2015 and submitted

Information
Benjy Weinberger
pants
Reviewers
pants-reviews
jsirois, patricklaw
This is done either by moving the compile calls out of module scope,
or by importing code lazily.

This takes re.compile from 11% of startup time, and 100s of calls,
to 3.5% of startup time, and tens of calls.

Ran relevant tests locally.
CI passes: https://travis-ci.org/pantsbuild/pants/builds/91066061

John Sirois
Benjy Weinberger
Benjy Weinberger
Benjy Weinberger
Review request changed

Status: Closed (submitted)

Change Summary:

0d95104ee4cc4a27af7549a09c849ed9fdcfdfeb

Eric Ayers

   

Thanks for working on making pants faster. I'm sorry I left this code in here so long, it turns out it isn't needed any more. I'm removing it in https://rbcommons.com/s/twitter/r/3123/

  1. Oh, even better! :)

Loading...