Skip to content

Conversation

knyghty
Copy link
Member

@knyghty knyghty commented Aug 22, 2025

Fixes #134

Uses a bit of caching to reduce the number of calls needed when using condition_dict.

For us, this reduces the number of queries in one view (for each step of that view) from nearly 300 to around 17. It's possible it could be improved further but I think this is a dramatic enough of an improvement to be useful on its own.

All the tests pass and I checked my wizards were all working locally. I went for a slightly more realistic test rather than a minimal test, but I can change this if desired.

A simpler solution is to cache the all property. It works quite well, but there are still some extra queries when doing this.

Copy link
Contributor

@claudep claudep left a comment

Choose a reason for hiding this comment

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

Thanks for the patch, it looks good to me, even if some added complexity might be a bug source.

I'd like at least one other approval before pushing it.

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.

multiple get_form_initial calls when condition_dict is used
2 participants