Optimize queries when publishing or discarding review drafts.

Review Request #5249 — Created Jan. 13, 2014 and submitted

Information

Review Board
master

Reviewers

Optimize queries when publishing or discarding review drafts.

Our Review publishing and discarding code was very inefficient. During
publish, we'd do 3 queries (one for every comment type), then a save on
each instance of a comment, which would end up doing an update of a
ReviewRequest per-comment. During delete, we'd do the 3 queries plus a
delete on each instance.

We now do 3 queries for publishing comments, and 3 for deleting.

Unit tests pass.

Published and discarded drafts without problems.

david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...