Giter Site home page Giter Site logo

Comments (4)

marco-calautti avatar marco-calautti commented on June 27, 2024

By having a quick look at the code, I believe the problem lies in the fact that mkpsxiso launches a thread (std::launch::async), for each sector for the XA file, to generate edc/ecc data, for each sector, which for very big files this would exhaust the maximum number of thread that can be run. In fact, when running mkpsxiso with gdb, I can see a lot of threads spawn.

I do not see the point of using threading for such a very simple task like generating ecc/edc, considering psx bins are not going to be very large anyway.

-EDIT- in fact, by removing all the async non-sense, everything works fine as expected. If using threads is really important, then I would suggest limiting the amount of tasks you spawn. My laptop has 32GB RAM, and this was not enough to pack a 434 MB XA file.

from mkpsxiso.

marco-calautti avatar marco-calautti commented on June 27, 2024

Probably you did not spot this issue, because the std library uses a thread pool in Windows. But on Linux, each std::async actually spawns a new thread. See https://stackoverflow.com/questions/29622179/async-uses-a-threadpool

from mkpsxiso.

CookiePLMonster avatar CookiePLMonster commented on June 27, 2024

The recent rewrite has added a lot of changed code that I fear has not been properly tested, and thus regressed the tool, rather than improving it.

The previous version was not even capable of generating proper checksums so any and all files built through it were technically broken. I'm sorry that a regression crept in, but a rewrite was available for testing for a while before it got merged to the mainline repository and all reported issues were fixed. I'm sure you realize you can't fix bugs nobody spots, and it's not realistic to achieve 100% coverage of all possible discs.

Probably you did not spot this issue, because the std library uses a thread pool in Windows. But on Linux, each std::async actually spawns a new thread

That's quite disappointing. In this case I think the idea of using a thread pool as in the PR is fine.

from mkpsxiso.

CookiePLMonster avatar CookiePLMonster commented on June 27, 2024

That's long fixed by #37.

from mkpsxiso.

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.