Page MenuHomePhabricator

Micro-optimization for linting performance
ClosedPublic

Authored by joshuaspence on Aug 12 2015, 5:05 AM.
Tags
None
Referenced Files
F13086686: D13876.diff
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
Unknown Object (File)
Jan 31 2024, 9:30 AM
Unknown Object (File)
Dec 24 2023, 3:51 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.