Coder Social home page Coder Social logo

Comments (3)

kylebarron avatar kylebarron commented on June 23, 2024 1

Well actually a stream interface is possible and was added in #296!

from parquet-wasm.

mf-bruce avatar mf-bruce commented on June 23, 2024

I should add, working with streams has the added benefit that streams can yield to the event loop. This is helpful when processing large amounts of data in a browser context as you need to yield to the event loop to keep the UI in a functional/responsive state.

from parquet-wasm.

kylebarron avatar kylebarron commented on June 23, 2024

From my knowledge of rust-wasm, I don't think a stream is possible. I couldn't even figure out a way to have an async iterator in JS that iterates on batches in the rust side.

The easiest workaround for now is to use the async functions to fetch one row group of data at a time. This only works when you're accessing a remote file; otherwise for a local file you still need to have all the source bytes in memory at once, though you can at least materialize the output arrow table in batches. The other big win for memory would be fleshing out the implementation of the Arrow C Data interface in JS, (I started that here), which would prevent a copy of the table from Arrow memory in Rust to the IPC buffer.

from parquet-wasm.

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.