dbt-labs / dbt-labs/dbt

[CT-1313] Investigate ways to improve performance of MacroGenerator calls in contexts

Open
#6,026 0 comments 0 reactions 0 assignees View on GitHub
engine:v1 performance type:tech-debt
Dominant language
Rust
Stars
13.8k
Forks
2.6k
Avg merge
21h 31m
Merged PRs (30d)
56

Description

One of the performance bottlenecks for the macro calls that are inserted into every provider context to enable calling macros is that an entire set of macros is created for every model. In a previous effort to improve the performance of parsing tests we limited the macros in the test contexts to macros that actually were called in the code via some jinja parsing and improved the macro depends_on. However those changes were not implemented for models because it's much more difficult with models to know which macros are actually getting called.

Investigate ways of improving the performance in this area. Ideally we would be able to create a set of macros and reuse them by swapping in model references.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.