-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Handling of partial output format is slow #4579
Comments
Using the Modifying the code to only validate the result at the end gives: I would thus propose using the second approach: validate once at the end to ensure we don't get invalid data in the database, and put a rescue block around the partial updates to catch and handle those errors. This does mean we might be less strict in checking, since each command is not checked individually in the partial format. |
sounds good 👍 |
If the checking of the full format fails, could we still check each individual partial command after? For judge development that seems quite important. I'm also not sure how robust the result constructor is when the partial commands are invalid. |
Can't we keep the current behaviour in development, or do we also want these granular checks in production? |
Keeping the current behaviour in development also seems fine. |
Switching to the new validator has improved things, but it can still be an issue for certain exercises: https://dodona.ugent.be/nl/submissions/13892016/ I propose to still implement the second part of the original PR. Do note that there are 1000+ tests in this exercise, so this is also a case of users "consuming" all performance gains by creating more/bigger tests. |
The fixing pull request was reverted. see #4647 |
Version 2 of the json schemer gem (merged in #4913) had additional performance improvements. There is thus no real need to implement additional strategies to speed this up. If others agree, this issue can be closed. (do note that the prepare time is quite high again) |
From executing https://dodona.ugent.be/nl/courses/2263/activities/649388223/ on my local machine:
Looking at the code, some obvious things seem the validation of each JSON object individually. The same exercise without validating each command gives:
The text was updated successfully, but these errors were encountered: