Open manfre opened 12 years ago
I was also interested in getting rid of the query-per-object behavior, as it was causing us severe performance problems, but I just confirmed that adding the visibility_column attribute to the DefaultModerator (or whatever your moderator class is called) indeed fixes the problem. In other words, with visibility_column properly set up, I was not able to reproduce this issue. Using django 1.4 and django-moderation 0.3.2.
The visibility column option is nice, but the default behavior is still broken.
Hey, is this library still maintained? This issue should have been closed.
Hi @grucha , It is not under active development. If you found any issues, PRs are welcome.
From the docs:
The default behavior of executing an additional query per object is severely broken. It forces the queryset to evaluate immediately, which results in an additional query for every record returned by the parent manager's default queryset. For most models, this is the entire table. This happens regardless of the filter, slicing, and whether or not the queryset is ever meant to be evaluated.
Example: