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

Improve performance of rebuilds #16283

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Feb 5, 2025

This PR introduces a performance improvement we noticed while working on on: #16211

We noticed that substituteFunctions was being called on every node after the compileAstNodes was done. However, the compileAstNodes is heavily cached.

By moving the substituteFunctions we into the cached compileAstNodes we sped up performance for Catalyst rebuilds from ~15ms to ~10ms.

Before After
image image

This way it is only executed once per `node` and will be cached
afterwards. Before that, this was happening every time.
@RobinMalfait RobinMalfait requested a review from a team as a code owner February 5, 2025 16:54
@RobinMalfait RobinMalfait changed the title Improve performances of rebuilds Improve performance of rebuilds Feb 5, 2025
Copy link
Member

@philipp-spiess philipp-spiess left a comment

Choose a reason for hiding this comment

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

Oh, found a whoopsie there huh 😅

@RobinMalfait
Copy link
Member Author

@philipp-spiess haha just a nice feeling when you move some code around and improve performance 😅

@RobinMalfait RobinMalfait merged commit d566dbd into main Feb 5, 2025
5 checks passed
@RobinMalfait RobinMalfait deleted the feat/improve-substitute-functions-performance branch February 5, 2025 17:46
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