Code Monkey home page Code Monkey logo

kh-snek's People

Contributors

gazmull avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

sariohara

kh-snek's Issues

Very Balanced Worker Spawn Method

The CPU cores are wasted due to the current code only distributing Resources per character (which is 3 Resources on average). On average, only 3 CPU cores were being occupied by the DownloadManager. Currently using the latest commit on a 12-core cloud instance and I'm wasting cents each second passes by.

Currently I can only propose that to occupy all CPU cores: do a round-robin distribution on Character[] as well. For of is very weak in this case so try to avoid it.

For Reference:

for (const char of this.data as ICharacter[]) {
const resources = [ ...char.resources.entries() ];
const balancedData = this._balanceData<[hashIdentifier, IResourceValues]>(resources);
const workers = await Promise.all(
balancedData.map((val, idx) => {
const finalData: ICharacter = {
id: char.id,
name: char.name,
resources: new Collection(val)
};
return this._spawnWorker(idx, finalData);
})
);
workersResult.push(...workers);
}

Feat: Add Flag For EX Episodes

Not sure how this exactly works at the moment but current solution is look up by incremental values (e.g. once 4 EX episodes were extracted, and another batch got released, resume from 5th EX episode being ++4).

Incorrect directory (files.rsc)

The last folder should be the episode's hash instead of DB's column name. What a massive blunder, but if this were to be considered a patch, the user will have to re-download all thousands of files again (Mine took 8 hours @ 100Mbps) unless I ignore existing files which is not really recommended in my part yet. It's not really a major breaking oversight, but just annoying as a structure overview. This will be considered for the next major version.

const fileNamesPath = `${auth.destinations.scenarios}${char.id}/${key}/`;

Feat: Make Resource Extractor Multi-Threaded

The only multi-threaded section of this project is the "Download Manager." Extractor could benefit as well specially on operations that start from scratch which takes too long to be done in the current single-thread design.

Start from here:

this.resourcesExtracted += await this._extract(id, resources);

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.