Page MenuHomePhabricator

Micro-optimization for linting performance
ClosedPublic

Authored by joshuaspence on Aug 12 2015, 5:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 3, 4:53 AM
Unknown Object (File)
Mon, Apr 29, 10:16 PM
Unknown Object (File)
Thu, Apr 25, 12:40 AM
Unknown Object (File)
Thu, Apr 11, 11:37 PM
Unknown Object (File)
Thu, Apr 11, 8:32 AM
Unknown Object (File)
Thu, Apr 4, 7:53 PM
Unknown Object (File)
Mar 21 2024, 6:34 AM
Unknown Object (File)
Feb 8 2024, 12:03 AM
Subscribers

Details

Summary

This is a micro-optimization to improve the performance of the XHPAST linter.

Test Plan

Ran arc lint --everything --never-apply-patches --xprofile=profile.json in rP. Compared the XHProf profile before and after.

Diff Detail

Repository
rPHU libphutil
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 7602
Build 8244: [Placeholder Plan] Wait for 30 Seconds
Build 8243: arc lint + arc unit

Event Timeline

joshuaspence retitled this revision from to Micro-optimization for linting.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.

I'm not entirely convinced that this is a good idea, but thought I'd pose the question.

Personally, it feels like assert_instances_of is something that should almost be a no-op when not running in development mode.

joshuaspence retitled this revision from Micro-optimization for linting to Micro-optimization for linting performance.Aug 12 2015, 9:16 AM
joshuaspence edited edge metadata.
joshuaspence edited the test plan for this revision. (Show Details)
epriestley edited edge metadata.

I think this is fine to remove any time it shows up on a profile. I've made similar changes once or twice elsewhere.

In the general case I still want it to run in production, because it makes debugging easier.

My only thought is that maybe we should leave a comment when we remove it so it doesn't get confused for an oversight later.

This revision is now accepted and ready to land.Aug 12 2015, 1:47 PM
This revision was automatically updated to reflect the committed changes.