GithubHelp home page GithubHelp logo

Comments (3)

alice-i-cecile avatar alice-i-cecile commented on May 27, 2024

We need an async / streaming abstraction for assets, but Reader may not be the right design. I'm currently inclined to ship with this for now, and then build out the right one once the rough edges become clearer.

from bevy.

mockersf avatar mockersf commented on May 27, 2024

this is true for any asset reader that could work on a stream, it could make sense for large files on native too

from bevy.

BeastLe9enD avatar BeastLe9enD commented on May 27, 2024

I'm just sharing my personal thoughts on it, maybe it will be interesting for others and exciting ideas will arise from it.

I see both sides, on the one hand it can of course limit options to stream bytes for example with an http request that does not support seek, on the other side I think it is really handy in some cases to have the AsyncSeek implementation, like seeking inside a file when only a specific region is needed.

I don't think AsyncSeek will be used often when loading assets in source format, but rather in processed assets. I think that in the future we also want to make it possible for different source assets to be processed with different asset processors, depending on which platform you are on. For example, on platforms that don't support seeking, we could split a large file into several files instead of seeking inside a big one.

Of course, we would still have the problem that all custom readers still have to implement the AsyncSeek trait. For me it feels wrong to have to implement dummy functions for all readers that don't support seeking. I think it would be good if the reader had a function from which you could possibly query optional seek functionality.

Maybe it's the wrong approach to have the seek functionality in the reader, but in my personal opinion it feels pretty intuitive :)

from bevy.

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.