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 MetricTimeQueryValidationRule #1481

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

plypaul
Copy link
Contributor

@plypaul plypaul commented Oct 28, 2024

This PR improves the performance of MetricTimeQueryValidationRule. One of the reasons for the slow performance is that it currently makes calls to get_joinable_scd_specs_for_metric, which can be slow with large manifests. Instead, this runs checks based on the resolved group-by-items, which is a much smaller set.

@cla-bot cla-bot bot added the cla:yes label Oct 28, 2024
Copy link

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.

@plypaul plypaul marked this pull request as ready for review October 28, 2024 17:10

valid_agg_time_dimension_specs = self._manifest_lookup.metric_lookup.get_valid_agg_time_dimensions_for_metric(
metric_reference
self._query_includes_metric_time = (
Copy link
Contributor

Choose a reason for hiding this comment

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

lol this is so much better I didn't know you could do it like this. Next time I'll do it this way!

@plypaul plypaul force-pushed the p--short-term-perf--27 branch from 5a5c7fa to 29b6a6c Compare October 29, 2024 23:00
Base automatically changed from p--short-term-perf--27 to main October 29, 2024 23:10
@plypaul plypaul force-pushed the p--short-term-perf--28 branch from dde61a2 to 84d4827 Compare October 29, 2024 23:10
@plypaul plypaul merged commit 4d7c806 into main Oct 29, 2024
15 checks passed
@plypaul plypaul deleted the p--short-term-perf--28 branch October 29, 2024 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants