Giter VIP home page Giter VIP logo

libfriendship's People

Contributors

wallacoloo avatar

Watchers

 avatar  avatar

Forkers

filtercutter

libfriendship's Issues

impl Display for Error types

The standard library implements it for all Error types. It's a good idea to do this to allow user-friendly error reporting.

Improve `ResMan` performance

When attempting to locate an effect on disk (form its name, URLs and hash), the current algorithm opens EVERY file in the search path, calculates its sha, verifies a sha match, then parses it and verifies the name.

This is costly enough to incur 20~30 seconds of startup time when searching a few hundred files for a simple LPF effect. Possible improvements include:

  • Cache shas of previously scanned effects to map sha -> file (note that the file can change on disk during runtime).
  • Search files with filename == "{EffectName}.fnd" first.
  • Verify hash while reading the file contents into memory rather than as two separate steps. Current logic is flawed such that file can be modifed between the hash test & reading its contents.

Cache Effect definitions

Effect::from_id returns a Rc<Effect>. The intention is that if the effect was already loaded before, it should return just another reference to that effect rather than recreating it fully, but this isn't quite implemented today.

Effect caching may be better implemented inside of ResMan - map hashes to Rc<Effect> and use the map as a cache.

Have RouteGraph enforce valid slot connections

It is currently possible to connect an edge to a slot of an effect that doesn't produce audio (is internally not connected to anything). The implied behavior is that the slot sources "0"s.

The downside to this is runtime checking for valid slots - either to avoid indexing errors or to enforce a contract, which also leads to lengthier and more complex code (notably in the LLVM JIT renderer). On the other hand, the RouteGraph already has to load effects to check for cycles, so this logic can be moved there at minimal cost. Let's do that.

Add JIT-based renderer

JIT compilation of effects seems pretty crucial for any reasonable performance.

Priorities for a first version should be:

  • JIT to host machine architecture; don't bother with GPGPU backends.
  • JIT only the effects (on load); don't bother with toplevel graph as a whole.
    • This allows JIT latency to be largely inconsequential, as effect loading is a time where interrupting of audio playback is acceptable.
  • Single threaded and literal translation of reference renderer to JIT. Algorithmic improvements can come later.

iron-kaleidoscope describes how to use LLVM as a JIT. This looks like a good route for a first version.

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.