Page MenuHomePhabricator

Remove expensive, pointless typeachecking in custom fields
ClosedPublic

Authored by epriestley on Jul 31 2016, 4:33 PM.
Tags
None
Referenced Files
F14047636: D16354.id39325.diff
Thu, Nov 14, 4:42 AM
F14047181: D16354.id.diff
Thu, Nov 14, 2:31 AM
F14047022: D16354.diff
Thu, Nov 14, 1:23 AM
F14046645: D16354.diff
Wed, Nov 13, 10:38 PM
F14045109: D16354.diff
Wed, Nov 13, 1:10 AM
F14043345: D16354.diff
Tue, Nov 12, 9:34 AM
F14026201: D16354.diff
Fri, Nov 8, 12:01 AM
F14024627: D16354.id39330.diff
Thu, Nov 7, 11:10 AM
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.