Closed zsol closed 1 year ago
Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.
Welcome to the EBP community! :tada:
Base: 84.44% // Head: 84.48% // Increases project coverage by +0.03%
:tada:
Coverage data is based on head (
fca087c
) compared to base (cb3bc80
). Patch coverage: 100.00% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
When repeatedly calling
to_docutils_ast
on relatively smalltext
s without sphinx support (I'll deal with that in a later PR), the runtime cost is dominated byyaml.safe_load
.Looks like
directives.yml
isn't expected to change, so it should be safe to load it only once, and cache the result for future invocations.I ran the following perf test on top of this PR (added an extra flag to
to_docutils_ast
that controlled clearing thelru_cache
):