Prevent unnecessary work in @webapi_request_fields.

Review Request #9681 — Created Feb. 20, 2018 and submitted — Latest diff uploaded

Information

Djblets
release-1.0.x
b68d16c...

Reviewers

The @webapi_request_fields decorator made unnecessary copies of
dictionaries in order to simplify some uncommon lookups, and had two
loops through one of the dictionaries when processing fields. This
wasn't particularly efficient, and made some upcoming work a bit more
difficult.

This change simplifies the logic to operate on existing state, instead
of copies of state, and to simplify the code for both normalizing values
and checking for field requirements.

Djblets and Review Board unit tests pass.

    Loading...