-
Notifications
You must be signed in to change notification settings - Fork 282
Fold testcase_run.sh logic into judgedaemon.
#3286
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
Conversation
|
No need to review yet, I am still testing and there are some follow-up changes required. |
d56ace2 to
afc9366
Compare
d196423 to
801bce8
Compare
801bce8 to
11e2bf7
Compare
11e2bf7 to
2e87efc
Compare
vmcj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to take a look at testcaseRunInternal()
example_problems/hello/submissions/time_limit_exceeded/stress-test-fork-setsid.c
Show resolved
Hide resolved
991ddde to
f19cf24
Compare
nickygerritsen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some smaller comments
meisterT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
writing nothing of essence here, just to unblock the other pending comment (insert old man yells at github meme here)
34f03a2 to
04d1a1a
Compare
b6b05e7 to
7251e44
Compare
The primary motivation is to significantly reduce the per-testcase overhead of judging a submission. Historically, with fewer test cases, the separation was carrying its weight. However, with modern problems requiring many test cases or passes, the overhead from dozens of forked simple programs (`cp`, `mv`, `chmod`, `grep` etc.) within the shell script has become a major performance bottleneck. Moving them into PHP effectively replaces them with simple system calls. This change results in a substantial performance improvement: * Roughly a 50% speed-up in total judging overhead per submission * Example: A simple C++ solution to a multi-pass problem (NWERC 2025 practice) was reduced from ~70s to ~33s end-to-end.
7251e44 to
686e7c7
Compare
The primary motivation is to significantly reduce the per-testcase overhead of judging a submission.
Historically, with fewer test cases, the separation was carrying its weight. However, with modern problems using many test cases or multiple passes, the overhead from dozens of forked simple programs (
cp,mv,chmod,grepetc.) within the shell script has become a major performance bottleneck. Moving them into PHP effectively replaces them with simple system calls.This change results in a substantial performance improvement: