Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove usage of pkg_resources pkg_resources is expensive to load, which takes more than 400ms here. Let's use importlib.metadata from stdlib for Python 3.8+, and fallback to importlib_metadata for Python 3.7. Note that `setuptools` was a missing runtime dependency before this change. This accelerates startup time significantly: Before: ``` $ time latex2mathml -V latex2mathml 3.73.1 real 0m0.728s user 0m0.607s sys 0m0.113s ``` After: ``` $ time latex2mathml -V latex2mathml 3.73.1 real 0m0.156s user 0m0.121s sys 0m0.037s ``` * Update version range for importlib-metadata Co-authored-by: Ronie Martinez <ronmarti18@gmail.com> * Update poetry.lock * Remove usage of pkg_resources pkg_resources is expensive to load, which takes more than 400ms here. Let's use importlib.metadata from stdlib for Python 3.8+, and fallback to importlib_metadata for Python 3.7. Note that `setuptools` was a missing runtime dependency before this change. This accelerates startup time significantly: Before: ``` $ time latex2mathml -V latex2mathml 3.73.1 real 0m0.728s user 0m0.607s sys 0m0.113s ``` After: ``` $ time latex2mathml -V latex2mathml 3.73.1 real 0m0.156s user 0m0.121s sys 0m0.037s ``` # Conflicts: # latex2mathml/converter.py # pyproject.toml --------- Co-authored-by: Felix Yan <felixonmars@archlinux.org>
- Loading branch information