( )⚙ D2881 hgweb: refactor multirequest to be a dict of lists

This is an archive of the discontinued Mercurial Phabricator instance.

hgweb: refactor multirequest to be a dict of lists
ClosedPublic

Authored by indygreg on Mar 16 2018, 12:41 PM.

Details

Summary

... instead of a list of 2-tuples.

This makes key lookups faster. The only downside is we lose total
ordering of all entries. But we weren't relying on that before, so
it's no loss.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Mar 16 2018, 12:41 PM
yuja accepted this revision.Mar 19 2018, 9:40 AM
This revision is now accepted and ready to land.Mar 19 2018, 9:40 AM
yuja added a comment.Mar 19 2018, 9:42 AM

Queued, thanks.

mercurial/hgweb/request.py
31

Deleted this comment in flight.

52

The behavior of len() changed, but I don't think that matters. The new
behavior should be fine since multidict isn't iterable.

This revision was automatically updated to reflect the committed changes.