Code Monkey home page Code Monkey logo

Comments (17)

Dust1404 avatar Dust1404 commented on June 6, 2024

If we write the results to the file after each judging, it might cause large amount of disk I/O, which is not good.
To solve it, as early as in LemonPlus, it is supported to save file manually.
It's in the menu of file(maybe, I remember). I can't remember if ctrl + s works.

from project_lemonlime.

threo9 avatar threo9 commented on June 6, 2024

If we write the results to the file after each judging, it might cause large amount of disk I/O, which is not good.
To solve it, as early as in LemonPlus, it is supported to save file manually.
It's in the menu of file(maybe, I remember). I can't remember if ctrl + s works.

Emmm,it seems that LemonLime can also save manually.
But I don't think writing the results to the file after each judging will cause large amount of disk I/O for a common contest.
like a test in a team,Most cdf files are very small,so I don't think the amount of disk I/O will be large enough to have an impact to
normal using.

from project_lemonlime.

undefined-moe avatar undefined-moe commented on June 6, 2024

Think about this situation:

Lemon is running a large contest and the system or lemon crashed due to some reason (oom, malicious code, etc)

The result should be auto-saved (after each run, or after a delay)

from project_lemonlime.

undefined-moe avatar undefined-moe commented on June 6, 2024

I think auto-saving for each 5min and create a backup for the old one(manually saved version) is a good way to handle this.

from project_lemonlime.

Dust1404 avatar Dust1404 commented on June 6, 2024

I think auto-saving for each 5min and create a backup for the old one(manually saved version) is a good way to handle this.

I agree with u, an autosave at regular time intervals is a good choice.

But I think the work to change the file format is more important now.

As cena, if we divide each player's result file, problemset file, contest file and maybe more, we can save each instead of saving the whole contest. Than the immediate saving function can be reached easily.

from project_lemonlime.

undefined-moe avatar undefined-moe commented on June 6, 2024

Too many files also leaks performance. I still think a simple json/xml/yaml file is better.

from project_lemonlime.

threo9 avatar threo9 commented on June 6, 2024

@undefined-moe
Let me start with something that happened in the past:
Maybe I'm a pupil that time.
We haved a contest and we have judged for dozens of minutes,but someone usedsystem("shutdown ")
then we have to re-judge all the codes again.
I think @Dust1404 's suggestion is feasible,but will it increase the difficulty of code to implement the operation of summing up grades?

from project_lemonlime.

undefined-moe avatar undefined-moe commented on June 6, 2024

This is a problem related to sandbox module, not contest management module.

from project_lemonlime.

threo9 avatar threo9 commented on June 6, 2024

Oh,we used lemon that time.

from project_lemonlime.

threo9 avatar threo9 commented on June 6, 2024

This is a problem related to sandbox module, not contest management module.

But lost results show it's defects of saving mechanism

from project_lemonlime.

threo9 avatar threo9 commented on June 6, 2024

ndbox module, not contest management module.

@undefined-moe btw,can problems like this be solved now?

from project_lemonlime.

undefined-moe avatar undefined-moe commented on June 6, 2024

btw,can problems like this be solved now?

maybe by using something like sandboxie on windows, cgroup on linux ?

and I have an idea: create a .progress file when judging, write pid to the first line, and after each contestant's code finished running, append the result to the file. And when lemonlime starts, check if the file exists, then check if the pid is running.
if pid is running, just display an error said the contest is locked by another lemonlime process,
and if not, display a prompt: "Found a uncompleted progress, do you want to load it and continue?" with "Yes", "Yes, but skip this contestant", "No" options to user.

from project_lemonlime.

threo9 avatar threo9 commented on June 6, 2024

btw,can problems like this be solved now?

maybe by using something like sandboxie on windows, cgroup on linux ?

and I have an idea: create a .progress file when judging, write pid to the first line, and after each contestant's code finished running, append the result to the file. And when lemonlime starts, check if the file exists, then check if the pid is running.
if pid is running, just display an error said the contest is locked by another lemonlime process,
and if not, display a prompt: "Found a uncompleted progress, do you want to load it and continue?" with "Yes", "Yes, but skip this contestant", "No" options to user.

Sounds great !

from project_lemonlime.

undefined-moe avatar undefined-moe commented on June 6, 2024

Is this in progress? 🤔

from project_lemonlime.

threo9 avatar threo9 commented on June 6, 2024

Is this in progress? 🤔

I also want to ask this question,
It's very useful, I think
@undefined-moe

from project_lemonlime.

threo9 avatar threo9 commented on June 6, 2024

日常催更/xyx

from project_lemonlime.

alphagocc avatar alphagocc commented on June 6, 2024

Now results are written every 30s

from project_lemonlime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.