Speed up the creation and publishing of drafts.

Review Request #5339 — Created Jan. 27, 2014 and submitted

Information

Review Board
master

Reviewers

Speed up the creation and publishing of drafts.

This massively reduces the number and complexity of queries needed to
both create review request drafts and to publish them. This code was old
and predated things like the F() queries and update_fields=. It also
took an ignorant approach to updating lists of ManyToManyFields.

We now make use of all three approaches to substantially reduce the
number of queries we have to perform, and to keep those queries simpler.

While in there, I also fixed copying over extra_data into the draft,
which was missing before.

Tested creating drafts with file attachments and other data. The data
carried over. I was able to publish it without problems. It all felt
a lot faster.

Unit tests passed, and had a small speed improvement.

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

Status: Closed (submitted)

Loading...