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

Fixes #11775: Skip clearing cache when handling new objects #11785

Merged
merged 1 commit into from
Feb 20, 2023

Conversation

jeremystretch
Copy link
Member

Fixes: #11775

When receiving post_save, check whether the object is newly created. If so, skip deleting any pre-existing cache records.

@kkthxbye-code
Copy link
Contributor

I tried it out and can confirm that it has the same effect on device creation time as adding the index. In general the change just makes sense and will probably improve query time across the board for all creations. I think this is an acceptable first step, if you want you can merge and resolve #11775 - and I'll create a new issue if I find other improvements.

Thanks for handling this :)

@jeremystretch
Copy link
Member Author

Sounds good. I've just opened #11790 to perform an application-wide audit for missing GFK indexes.

@jeremystretch jeremystretch marked this pull request as ready for review February 20, 2023 13:17
@jeremystretch jeremystretch merged commit 0855ff8 into develop Feb 20, 2023
@jeremystretch jeremystretch deleted the 11775-search-cache-optimization branch February 20, 2023 13:17
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating devices takes an inordinate amount of time
2 participants