cpisciotta / xcbeautify

A little beautifier tool for xcodebuild
MIT License
957 stars 68 forks source link

Drastically Improve Speed and Memory Performance #253

Closed cpisciotta closed 7 months ago

cpisciotta commented 7 months ago

Changes

Drastically improve xcbeautify's performance (time and memory). Testing with a large xcodebuild log, this change dropped xcbeautify's execution time by ~90% and memory footprint by ~99%.

Testing

Average results after formatting large_xcodebuild_log.txt (99.9 MB xcodebuild log).

Measurement Before After Absolute Difference Percentage Difference
Memory 2.21 GB 8.3 MB -2254.74 MB / -2.2 GB -99.63%
Time 66 seconds 5.9 seconds -60.1 seconds -91%
codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 89.47368% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 84.94%. Comparing base (092bb2d) to head (cbc94b2).

Files Patch % Lines
Sources/XcbeautifyLib/Parser.swift 33.33% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #253 +/- ## ========================================== - Coverage 85.76% 84.94% -0.82% ========================================== Files 14 14 Lines 1545 1461 -84 ========================================== - Hits 1325 1241 -84 Misses 220 220 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.