Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache the macro manifest #1128

Merged
merged 2 commits into from
Nov 20, 2018
Merged

Conversation

drewbanin
Copy link
Contributor

Fixes #1098

I had played around with this a while back to inform how much of a speedup we'd get in parsing. This change really makes the parsing step fly! I took a pretty heavy-handed approach here, so I'm very open to feedback/suggestions on ways to do this better.

For our internal analytics project, this brings the "time to stdout" down from 11.1s to 6.8s. That's not a rigorous analysis, but I'm sure it will be welcomed by many.

Copy link
Contributor

@beckjake beckjake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am really excited about this PR. This is awesome.

dbt/loader.py Outdated

# make a manifest with just the macros to get the context
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this belongs on line 36? The indentation is weird.

@@ -59,7 +66,8 @@ def _load_seeds(self):
all_projects=self.all_projects,
root_dir=project.project_root,
relative_dirs=project.data_paths,
macros=self.macros
macros=self.macros,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A future cleanup PR could probably go back and remove the macros parameter here since they're part of the manifest, but I suspect it's actually a bit tricky to do so.

@drewbanin drewbanin merged commit 416173a into dev/grace-kelly Nov 20, 2018
@drewbanin drewbanin deleted the cache-macro-only-manifest branch November 20, 2018 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants