Switch to xxhash to save farmhash jiggery-pokery when initialising Docker image
This commit is contained in:
parent
b25b96d9de
commit
10044b6749
|
@ -14,7 +14,7 @@ const paths = require('path');
|
||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
const iconv = require('iconv-lite');
|
const iconv = require('iconv-lite');
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
const farmhash = require('farmhash');
|
const xxhash = require('xxhash');
|
||||||
|
|
||||||
exports.getArt = getArt;
|
exports.getArt = getArt;
|
||||||
exports.getArtFromPath = getArtFromPath;
|
exports.getArtFromPath = getArtFromPath;
|
||||||
|
@ -288,7 +288,7 @@ function display(client, art, options, cb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!options.disableMciCache) {
|
if(!options.disableMciCache) {
|
||||||
artHash = farmhash.hash32(art);
|
artHash = xxhash.hash(new Buffer(art), 0xCAFEBABE);
|
||||||
|
|
||||||
// see if we have a mciMap cached for this art
|
// see if we have a mciMap cached for this art
|
||||||
if(client.mciCache) {
|
if(client.mciCache) {
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
"buffers": "NuSkooler/node-buffers",
|
"buffers": "NuSkooler/node-buffers",
|
||||||
"bunyan": "^1.8.12",
|
"bunyan": "^1.8.12",
|
||||||
"exiftool": "^0.0.3",
|
"exiftool": "^0.0.3",
|
||||||
"farmhash": "^2.0.4",
|
|
||||||
"fs-extra": "^4.0.1",
|
"fs-extra": "^4.0.1",
|
||||||
"graceful-fs": "^4.1.11",
|
"graceful-fs": "^4.1.11",
|
||||||
"hashids": "^1.1.1",
|
"hashids": "^1.1.1",
|
||||||
|
@ -52,6 +51,7 @@
|
||||||
"uuid": "^3.1.0",
|
"uuid": "^3.1.0",
|
||||||
"uuid-parse": "^1.0.0",
|
"uuid-parse": "^1.0.0",
|
||||||
"ws": "^3.1.0",
|
"ws": "^3.1.0",
|
||||||
|
"xxhash": "^0.2.4",
|
||||||
"yazl" : "^2.4.2"
|
"yazl" : "^2.4.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
|
|
Loading…
Reference in New Issue