From 4f9ec8b6a454eaab8cf52e774613c5dc69d219e6 Mon Sep 17 00:00:00 2001 From: Stefano Brilli Date: Tue, 24 Mar 2020 00:27:52 +0100 Subject: [PATCH] Update to latest netmd-js. Set chunkSize to ~500kb Lowering from 1Mb to 512kb seems to improve the performance of encryption worker. --- package-lock.json | 6 +++--- package.json | 2 +- src/services/netmd.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 895c2df..b172848 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9532,9 +9532,9 @@ "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" }, "netmd-js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/netmd-js/-/netmd-js-1.0.1.tgz", - "integrity": "sha512-6XSrpJ/gEUywq538H5NHViSc8Z8ZSozj4hFI5au26Dt4BIea1JrW84UvCBFG/JuIjKSOPtJeYcM75RuiXqW9rw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/netmd-js/-/netmd-js-1.0.2.tgz", + "integrity": "sha512-kgl5l8yqOdr7V6VVumrtuLeSNBqgEs9db6XJMOfyA4RtYyNPM9xMOeoU04z3hjr6n4C97G88T5u0x9TG6dpPOg==", "requires": { "browser-bunyan": "^1.5.3", "bunyan": "^1.8.12", diff --git a/package.json b/package.json index d07742e..3235eec 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "clsx": "^1.1.0", "husky": "^4.2.2", "lint-staged": "^10.0.7", - "netmd-js": "^1.0.1", + "netmd-js": "^1.0.2", "prettier": "^1.19.1", "react": "^16.12.0", "react-dom": "^16.12.0", diff --git a/src/services/netmd.ts b/src/services/netmd.ts index 4cd6057..9ecd905 100644 --- a/src/services/netmd.ts +++ b/src/services/netmd.ts @@ -85,7 +85,7 @@ export class NetMDUSBService implements NetMDService { updateProgress(); }); - let mdTrack = new MDTrack(title, format, data, webWorkerAsyncPacketIterator); + let mdTrack = new MDTrack(title, format, data, 0x80000, webWorkerAsyncPacketIterator); await download(this.netmdInterface!, mdTrack, ({ writtenBytes }) => { written = writtenBytes;