-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Use release build config instead of debug for Swift runtime tests (improve performance more than 50%) #3425
Conversation
What's wrong with our MaxOSX runner? I see the following error:
|
It works after the following changing |
afb0f66
to
69b5d8c
Compare
GitHub CI does not show any improvement in performance but such improvement definitely exists on my local machine. It's weird. |
Don't expect any improvement, all MacOS tests run on a single Mac Mini hosted at my home. There are 4 runners configured, which consume 100% CPU since they run test jobs in parallel. |
I changed |
Also, I think we should think about a more reliable and independent server that is not bound to any personal computer. |
It's a matter of cost. Hosted MacOS CI is expensive, unlike Linux which we get for free from Circle CI, and -limited-Windows, which we get for free from AppVeyor. We migrated from Travis CI because they changed their OSS pricing policy. |
Running on MacOS is important because in such a way we cover all platforms (Windows, Linux, Mac), do I understand correctly? Actually, Swift test also can be run on Linux as well (as I've run it on my virtual machine with Ubuntu). |
Swift/Linux is still on Travis because when we migrated to Circle CI I could not get it to work there. |
Looks like the MacOS runners got killed somehow, I'm currently restarting them |
Yes it's very important to run Swift and Cpp on MacOS |
I'll try. But it looks like Travis is not included in CI now. At least it's not shown on the main page and in the status. |
Looks like your proposed changes crashed the MacOS sessions, I had to cancel all pending jobs in order to restart the CI runners. Please revert all macOS related changes |
We removed it from the page because it was always red dur to lack of credit |
MacOS session was broken 13 days ago: https://github.com/antlr/antlr4/actions?page=5 (last green status was 13 days ago) The current request does not affect self-hosted machine at all because I changed it: https://github.com/antlr/antlr4/pull/3425/files#diff-e38b7572f251b71add05b02e5c33ba21406d09443e45923f1e609e1b1be89e30R11 :
Did you mean to revert this line? Also, I don't understand how my MacOS related changes could break something. |
69b5d8c
to
11bf13b
Compare
I reverted the configuration back to |
@parrt or @ericvergnaud please merge |
@ericvergnaud I noticed that when I used multiple threads swift-frontend processes exploded on my M1 mac and it was extremely difficult to kill them all before the machine froze. Couldn't even get Shell to run killall. |
@KvanTTT @ericvergnaud I am running and timing Swift on my M1 Mac and then we'll see what this one does. |
Hmmm...if release is always faster, why are we even bothering to allow the debug version? It complicates the code and it's just the testing rig. Would it be reasonable to simply force release to merge a simpler change? |
Yes I saw a similar scenario the other day, had to reboot our CI and cancel all pending jobs.
We would need to somehow limit the number of parallel testing threads in the CI.
… Le 23 déc. 2021 à 18:59, Terence Parr ***@***.***> a écrit :
@ericvergnaud <https://github.com/ericvergnaud> I noticed that when I used multiple threads swift-frontend processes exploded on my M1 mac and it was extremely difficult to kill them all before the machine froze. Couldn't even get Shell to run killall.
—
Reply to this email directly, view it on GitHub <#3425 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAZNQJEDENUN24JLIRNAQW3USNPQJANCNFSM5KQ3KTAQ>.
You are receiving this because you were mentioned.
|
I suspect that there's something weird about M1 + swift + lots of threads combination; we don't see this with other Target so I don't think. |
It's just a flag, it can be used for debugging in some scenarios. I don't think it complicates anything especially compare to other duplicated code that complicates much more. |
Well my first rule software development is always to use the simplest possible thing that will work. Unless there is a reason to keep debug mode let's remove it and simplify. Thanks! |
… BaseSwiftTest (use release always)
Thanks @KvanTTT and good catch! Full tests for swift take 42m55.062s single threaded on my machine and I will try again now, although as you pointed out this is testing maybe more of the start of time for each test. The python Version runs superfast so we know that the overall test rig is not the main problem; could be launching of Swift each time or could be the actual parsing part. |
Victory for @KvanTTT (Single threaded on my M1 mac): Before:
AFTER:
|
No description provided.