Skip to content

Conversation

@meisterT
Copy link
Member

@meisterT meisterT commented Dec 7, 2025

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, 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.

@meisterT
Copy link
Member Author

meisterT commented Dec 7, 2025

No need to review yet, I am still testing and there are some follow-up changes required.

@meisterT meisterT force-pushed the judgedaemon_go_brrrrrrrrrrrr branch 6 times, most recently from d56ace2 to afc9366 Compare December 14, 2025 16:36
@meisterT meisterT force-pushed the judgedaemon_go_brrrrrrrrrrrr branch from d196423 to 801bce8 Compare December 23, 2025 09:27
@meisterT meisterT force-pushed the judgedaemon_go_brrrrrrrrrrrr branch from 801bce8 to 11e2bf7 Compare January 3, 2026 17:45
@meisterT meisterT marked this pull request as ready for review January 3, 2026 18:29
@meisterT meisterT force-pushed the judgedaemon_go_brrrrrrrrrrrr branch from 11e2bf7 to 2e87efc Compare January 7, 2026 19:27
Copy link
Member

@vmcj vmcj left a 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()

@meisterT meisterT force-pushed the judgedaemon_go_brrrrrrrrrrrr branch 2 times, most recently from 991ddde to f19cf24 Compare January 9, 2026 19:41
Copy link
Member

@nickygerritsen nickygerritsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some smaller comments

Copy link
Member Author

@meisterT meisterT left a 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)

@meisterT meisterT force-pushed the judgedaemon_go_brrrrrrrrrrrr branch from 34f03a2 to 04d1a1a Compare January 10, 2026 12:40
@meisterT meisterT requested a review from eldering January 10, 2026 12:40
@meisterT meisterT force-pushed the judgedaemon_go_brrrrrrrrrrrr branch 9 times, most recently from b6b05e7 to 7251e44 Compare January 14, 2026 20:15
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.
@meisterT meisterT force-pushed the judgedaemon_go_brrrrrrrrrrrr branch from 7251e44 to 686e7c7 Compare January 15, 2026 18:49
@meisterT meisterT added this pull request to the merge queue Jan 15, 2026
Merged via the queue into DOMjudge:main with commit 2f3e8cc Jan 15, 2026
41 checks passed
@meisterT meisterT deleted the judgedaemon_go_brrrrrrrrrrrr branch January 15, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants