-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Severe memory usage #162
Comments
Hola 👋, We want to inform you that the issue has been marked as stale. This means that there hasn't been any activity or updates on it for quite some time, and it's possible that it may no longer be relevant or actionable. |
Hi 👋 I'm seeing the same issue with Xcode 15.2 & macOS Sonoma (14.2.1). It sometimes goes up to 4GB. Thanks |
Hi @gutaker and @victor-sarda! Thank you for filing this issue, and I'm sorry for the delayed response. I do have some follow-up questions, so I can better understand the potential root cause. As a general note, I expect gradual performance improvements over time. As we introduce missing regexes, we'll reduce the amount of searches. Similarly, as we improve the regexes themselves, we'll reduce their associated search complexity. |
@gutaker Can you share the generated xcodebuild/xcbeautify command? More specifically, can you share what flags - if any - you're passing to xcbeautify? I see you're using JUnit in your fastlane invitation. I'd like to see if you're using xcbeautify's JunitReporter too. |
Hi @victor-sarda. Thanks for the follow-up. Can you share your xcodebuild/xcbeautify command? I'd specifically like to see what flags - if any - you're passing to xcbeautify. |
Hey @cpisciotta sure! Here's the xcodebuild command I use (from Fastlane): set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace <redacted>.xcworkspace -scheme UnitTests -derivedDataPath /Users/victor.sarda/Library/Developer/Xcode/DerivedData/<redacted>-dvyxozgptgpxumegogztmewovxws -destination 'platform=iOS Simulator,name=iPhone 14 Pro,OS=17.2' -resultBundlePath './fastlane/test_output/UnitTests.xcresult' -parallel-testing-worker-count 1 -enableCodeCoverage YES -testPlan 'UnitTests' COMPILER_INDEX_STORE_ENABLE='NO' -skipPackagePluginValidation build test | tee '/Users/victor.sarda/Library/Logs/scan/UnitTests-UnitTests.log' | xcbeautify This ran on an M1 Pro Macbook Pro on Sonoma (14.3.1) with Xcode 15.2. When running, I can see that xcbeautify gradually consumes RAM, usually up to 4GB. Let me know if you need more details! |
Thanks @victor-sarda! I don't have an immediate fix, but I'll continue to investigate this and address overall performance. Please let me know if its performance gets noticeably worse (or better) with future releases. As a note, I intend to release v2 this weekend, so I expect the upcoming architectural changes (and the ability to refactor more quickly) will help address performance-related concerns. |
Great news @gutaker and @victor-sarda! After investigation, I've narrowed down a huge bottleneck in xcbeautify's performance. You can track the upcoming changes in #253. The improvements are... drastic. From my testing on my machines, on average, I'm seeing a 90% time savings and a 99% memory savings. Thanks for your patience and your help flagging this issue! Huge improvements coming coon! |
Hey @cpisciotta that's awesome news, thanks for having a look! |
This issue should be fixed starting with the recently released version, 1.5.0. If you continue to see this issue, please let me know. |
Thank you! I'll try first thing tomorrow and will let you know 👍 |
Sorry guys for such late reply - I was totally off-grid. I can see however you've already solved the issue. Thanks a bunch! |
Hey @cpisciotta, I can confirm the issue is fixed on our runners with v1.6.0! |
Issue:
I have a really big project with mixed Swift, SwiftUI. There are ~9k unit tests. When I run unit testing, the memory usage of
xcbeautify
grows up to 7GBs...Test are ran with
fastlane
, with invocationfastlane scan --workspace mobileApp.xcworkspace --scheme UnitTests --derived_data_path "./DerivedData" --device "iPhone 15 Pro" -c true --output_files "mobileapp.unit.test.report.html,mobileapp.unit.test.report.junit"
Here's screenshot
fastlane env
output below, however, the issue is there formacOS Sonoma 14.1.1/Xcode 15.0.1
and for good, old, stablemacOS Ventura 13.6/Xcode 14.2
as well.🚫 fastlane environment 🚫
Stack
System Locale
fastlane files:
No Fastfile found
No Appfile found
fastlane gems
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
generated on: 2023-11-27
The text was updated successfully, but these errors were encountered: