Page MenuHomePhabricator

Remove expensive, pointless typeachecking in custom fields
ClosedPublic

Authored by epriestley on Jul 31 2016, 4:33 PM.
Tags
None
Referenced Files
F14026201: D16354.diff
Fri, Nov 8, 12:01 AM
F14024627: D16354.id39330.diff
Thu, Nov 7, 11:10 AM
F14015211: D16354.diff
Sun, Nov 3, 3:40 PM
F14015173: D16354.id.diff
Sun, Nov 3, 3:09 PM
F14013531: D16354.id39330.diff
Sat, Nov 2, 7:34 AM
F14004437: D16354.id39330.diff
Sat, Oct 26, 8:37 PM
F13995566: D16354.diff
Wed, Oct 23, 1:56 PM
F13973117: D16354.id39330.diff
Thu, Oct 17, 11:13 PM
Subscribers
None

Details

Summary

Ref T11404. On my system, this improves performance by 10-15% for differential.revision.search.

PhutilTypeSpec provides high quality typechecking and is great for user-facing things that need good error messages.

However, it's also a bit slow, and pointless here (the API is internal and it only has one possible option).

I think I added this after writing checkMap just because I wanted to use it more often. My desire is sated after finding many reasonable ways to use it to give users high-quality error messages about things like configuration files.

Test Plan

Profiled differential.revision.search before and after change, saw wall time drop from ~220ms to ~195ms.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Remove expensive, pointless typeachecking in custom fields.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: chad, yelirekim.
chad edited edge metadata.
This revision is now accepted and ready to land.Jul 31 2016, 4:34 PM
This revision was automatically updated to reflect the committed changes.