Git Product home page Git Product logo

Comments (3)

janpaul123 avatar janpaul123 commented on September 23, 2024

Is this in the browser or in nodejs? Do you have a Github Gist or so of how you ran this? From what I remember the difference was much more dramatic, but I think that was mostly in the browser.

from wasm-lz4.

jz3xyz avatar jz3xyz commented on September 23, 2024

It's from nodejs version 12.11.1

node --version
v12.11.1

Code looks like this

const { open, TimeUtil } = require('rosbag')
const lz4 = require('lz4js')
const decompress = require('wasm-lz4')
const uuidv4 = require('uuid/v4')

const { performance } = require('perf_hooks');
const newTopics = []

// Begin Reading from Bag
const t0 = performance.now()
await bag.readMessages({
  topics: newTopics,
  decompress: { lz4: decompress },
}, result => {
  const { timestamp, message, topic } = result;
  // Convert message info to records
})
  .finally(() => { })
  .catch(err => { throw err })
const t1 = performance.now()
console.log(`[Converted] bag to X files in ${((t1 - t0) / 1000).toFixed(2)} seconds`)
//...

from wasm-lz4.

janpaul123 avatar janpaul123 commented on September 23, 2024

Ah that's still quite impressive since that library doesn't use any native extensions! 😮

from wasm-lz4.

Related Issues (4)

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.