dbt-labs / dbt-common

Apache License 2.0
13 stars 15 forks source link

Accelerate block tag iteration #205

Closed peterallenwebb closed 1 month ago

peterallenwebb commented 1 month ago

resolves https://github.com/dbt-labs/dbt-core/issues/9037

Description

The process of finding and iterating through jinja blocks could be quite slow. These changes accelerate the process by caching useful information about what searches have already been performed.

Many thanks to @fredriv for pointing out that this was still a problem and pushing for a fix.

Checklist

github-actions[bot] commented 1 month ago

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.48%. Comparing base (ed11c6c) to head (6b18e61).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #205 +/- ## ========================================== + Coverage 68.33% 68.48% +0.14% ========================================== Files 52 52 Lines 3373 3389 +16 ========================================== + Hits 2305 2321 +16 Misses 1068 1068 ``` | [Flag](https://app.codecov.io/gh/dbt-labs/dbt-common/pull/205/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/dbt-labs/dbt-common/pull/205/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `68.48% <100.00%> (+0.14%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.