-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Requiring this package on node uses 2 cpus #80
Comments
I pulled some power consumption numbers from powertop and dstat, going from a fresh startup, to plugging in the Korg NanoKontrol2 I use, to running midisnoop listening via alsa while i tap ~2 buttons/s, to turning that off & starting web-midi-api-shim, running requetMIDIAccess() & nothing else, & again tapping ~2 buttons/s.
|
I haven't tried using it in any real capacity what-so-ever, but https://github.com/abudaan/WebMIDIAPIShim/tree/upgrade-2018 branch shows very tame cpu usage. I'll see about reproducing above conditions to test how much better, but it looks really close to midisnoop. But I haven't done any real work with that branch yet! @abudaan - can you report in on the status of that branch? what are the major work areas remaining? anything I can assist with? |
Is that issue from WebMIDIAPIShim or from the underlying https://www.npmjs.com/package/jazz-midi ? |
@jazz-soft I'm not super sure how to test. I imported jazz-midi in a repl, and ran |
You can set the callback function in jazz-midi: http://jazz-soft.net/doc/Jazz-Plugin/MidiInOpen.html |
@jazz-soft In @abudaan's |
I believe that was an experimental branch. |
@jazz-soft @rektide Yes, Sema is right, I will start working on this branch again early April and it will be backwards compatible so you should be able to update the WebMIDIAPIShim by then without breaking your project's code. |
@abudaan FYI: I'm planning to make JZZ expose Web MIDI API in the next release. If you are interested, we can discuss it by email. |
This entire dependency is about to be deprecated by jzz's direct implementation of web-midi ( cwilso/WebMIDIAPIShim#80 ) but I just want the magic to happen. Also this is using my fork of web-midi-api-shim. :p
This entire dependency is about to be deprecated by jzz's direct implementation of web-midi ( cwilso/WebMIDIAPIShim#80 ) but I just want the magic to happen. Also this is using my fork of web-midi-api-shim. :p
This entire dependency is about to be deprecated by jzz's direct implementation of web-midi ( cwilso/WebMIDIAPIShim#80 ) but I just want the magic to happen. Also this is using my fork of web-midi-api-shim. :p
@rektide & @abudaan, please have a look at https://github.com/jazz-soft/JZZ - it now enables Web MIDI API |
Great work! I have replaced the WebMIDIAPIShim in both heartbeatjs and qambi and it works like a charm! I think we can now deprecate the WebMIDIAPIShim? |
Hello. If I
require('web-midi-api-shim'); navigator.requestMIDIAccess()
from Node.js (say a repl, or small script) my Node process starts using two CPUs at >90%. Context-switches go from ~500/s to 36k/s.This makes the library unsuitable for use on a laptop or battery powered system, and I am unsure but somewhat under the impression that it degrades my other web browsing activity on this computer.
The text was updated successfully, but these errors were encountered: