Homec4science

Provide more flexible caching for AAST

Authored by epriestley <git@epriestley.com> on Mar 8 2012, 21:19.

Description

Provide more flexible caching for AAST

Summary:

  • Provide buildSelectCache() to improve the performance of multiple selectDescendandsOfType() calls.
  • Provide selectTokensOfType() as a performant accessor for some token selection.
  • Provide buildTokenCache() to improve the performance of multiple selectTokensOfType() calls.
  • Memoize and microoptimize some other hot paths.

Test Plan: XHPASTLinter runs correctly but ~5x faster on the unit test dataset (see next diff).

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1828

Details

Committed
epriestley <git@epriestley.com>Mar 8 2012, 21:19
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUcff028a25e52: Add builtin CLI profiling to every PhutilArgumentParser script
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU4553ef3eff44: Provide more flexible caching for AAST (authored by epriestley <git@epriestley.com>).Mar 8 2012, 21:19