Skip to content

Conversation

smsearcy
Copy link

@smsearcy smsearcy commented May 13, 2024

As noted in #700, we noticed the overhead of construct_aggregate_queries() looping through all the objects in the session, even if there were no aggregates defined. Thus, this short-circuits that process if there are no aggregators registered.

Fixes #700

Constructing the aggregate queries looped through all objects in the
session, even if no aggregates had been defined.  This event was
registered, just by importing `sqlalchemy_utils`, leading to unexpected
side effects (slowdown) if a program loaded lots of models into a
session.
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.

Event listener for aggregates can cause performance issues on import

1 participant