reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Cache the result of loading pyproject.toml file

Open ericwb opened this issue 1 year ago β€’ 1 comments

This change adds the functools cache decorator to avoid repeated calls to _get_package_config, which results in IO hits to read a file.

Closes #3341

All Submissions:

  • [x] Have you followed the guidelines stated in CONTRIBUTING.md file?
  • [x] Have you checked to ensure there aren't any other open Pull Requests for the desired changed?

Type of change

Please delete options that are not relevant.

  • [x] Bug fix (non-breaking change which fixes an issue)

New Feature Submission:

  • [x] Does your submission pass the tests?
  • [x] Have you linted your code locally prior to submission?

Changes To Core Features:

  • [x] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [ ] Have you written new tests for your core changes, as applicable?
  • [x] Have you successfully ran tests with your changes locally?

ericwb avatar May 19 '24 22:05 ericwb

Oops, functools.cache is only available in Python 3.9. Need to switch to lru_cache

ericwb avatar May 19 '24 22:05 ericwb