Allow disablement of forum_index updates

Created on 6 August 2012, almost 12 years ago
Updated 15 May 2024, about 1 month ago

When performing bulk inserts/deletes of comments (as in migration processes), calling _forum_update_forum_index() once for each comment is wasteful - it would be much more efficient for a bulk process to disable the individual updates and do a bulk update at the end. We faced this issue with node statistics previously, and added the comment_maintain_node_statistics variable for this purpose. It's tempting to piggy-back on that variable - certainly for my use case manipulating one variable rather than two would be simpler - but it may be cleaner to introduce a new one.

See #1715402: Poor performance of _forum_update_forum_index() when passed a non-forum node for another _forum_update_forum_index performance optimization.

Feature request
Status

Needs work

Version

2.0

Component

forum.module

Created by

🇺🇸United States mikeryan Murphysboro, IL, USA

Live updates comments and jobs are added and updated live.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024