[Presubmit Speed] Refactor XmlStyle.PrettyPrintNode
It's a big method that can easily be broken up into smaller methods. This will make it easier to review downstream changes. Also, rather than create a TextWrapper every time it's needed, I instantiated one for the class. That winds up saving about .3 seconds when running histograms pretty_print.py. Bug: 1538783 Change-Id: I4bb697c74472e8729060828e29a2f67766fa4f43 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1543248 Commit-Queue: Alexei Svitkine <asvitkine@chromium.org> Reviewed-by:Alexei Svitkine <asvitkine@chromium.org> Cr-Commit-Position: refs/heads/master@{#646423}
Showing
This diff is collapsed.
Please register or sign in to comment