We call rebuild_kb() on cron every 6 hours. It goes through all the wiki documents that have a current_revision set and updates it's html: document.html = document.current_revision.content_parsed document.save() This is wasteful as most of the time there content has not changed but we are always making a full database call. There are two optimizations we can do here: 1- First compare the values and, if they are the same, move on. 2- Do an update() instead of a save(). That way we are only sending back the html field. This kills a tiny race condition and avoids sending unchanged data back to the db for update. This would also skip post_save signals. If we want this to trigger a reindex of the document, we'll have to call it directly or something. It currently isn't triggering the reindex.
(In reply to Ricky Rosario [:rrosario, :r1cky] from comment #0) > If we want this to trigger a reindex of the document, we'll have to call it > directly or something. It currently isn't triggering the reindex. See bug 797038
In a pull request: https://github.com/mozilla/kitsune/pull/875
Landed and deployed: https://github.com/mozilla/kitsune/commit/4a66185a082672f6070b7b4d9378462e0d367781
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Adding s= sprint information to whiteboard.
Whiteboard: u=dev c=wiki p=0 → u=dev c=wiki p=0 s=2012.19
You need to log in before you can comment on or make changes to this bug.