-
-
Notifications
You must be signed in to change notification settings - Fork 624
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
Multiple queries when adding tags #880
Comments
Could you post what kind of tags are shown to be made? It might be a bit endemic to how Django models work by default |
This is my request body:
this is how I add tags:
|
OK so if you know what you are doing and don't use save hooks or the like and really know what you are doing , you can use The problem with django Taggit's "create N tags" is really just a shortcut for "create 1 tag, but do it for n objects". We're doing lookups to find existing tags, and then calling Having said that, I think this could be a good FAQ entry. I've opted for (And as usual: this is all based on the assumption that this is a performance issue on your project to begin with. Measuring the impact on production is so important) |
Inspecting with django-toolbar I found that taggit makes n*2 queries for adding n number of tags.
Is there any way to optimize this?
The text was updated successfully, but these errors were encountered: