Code Monkey home page Code Monkey logo

Comments (2)

Farof avatar Farof commented on August 24, 2024

I don't really understand what you mean. Things are already cached as long as you keep references to opened archives so things don't get parsed twice.

Could you provide usescases that you think are problematic with the current API and explain how they are problematic?

from heroprotocoljs.

jnovack avatar jnovack commented on August 24, 2024

The problem is with the extract. The mpyqjs library is too slow.

I would like to extract the file with ANOTHER library, but use this library to parse it. My only option to interface with this library currently is sent it a replay, and a variable.

const heroprotocol = require('../');
const details = heroprotocol.get(heroprotocol.DETAILS, process.argv[2]);

I would LIKE to be able to send it data I've already extracted.

const heroprotocol = require('../');
const header = heroprotocol.parseHeader(buffer);
const details = heroprotocol.parseFile(buffer, header.build);

Why? Because I can extract files 60% faster using StormLib rather than mpyqs. There's little point to rewriting heroprotocoljs when it does everything I need, it just does not expose it.

Extracting 28 replays with mpyqs

real 1m43.637s
user 1m35.931s
sys  0m6.731s

Extracting 28 replays with storm-replay

real 0m37.774s
user 0m32.481s
sys  0m1.858s

from heroprotocoljs.

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.