Switch to xxhash to save farmhash jiggery-pokery when initialising Docker image

This commit is contained in:
David Stephens 2017-11-26 18:26:56 +00:00
parent b25b96d9de
commit 10044b6749
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ const paths = require('path');
const assert = require('assert');
const iconv = require('iconv-lite');
const _ = require('lodash');
const farmhash = require('farmhash');
const xxhash = require('xxhash');
exports.getArt = getArt;
exports.getArtFromPath = getArtFromPath;
@ -288,7 +288,7 @@ function display(client, art, options, cb) {
}
if(!options.disableMciCache) {
artHash = farmhash.hash32(art);
artHash = xxhash.hash(new Buffer(art), 0xCAFEBABE);
// see if we have a mciMap cached for this art
if(client.mciCache) {

View File

@ -27,7 +27,6 @@
"buffers": "NuSkooler/node-buffers",
"bunyan": "^1.8.12",
"exiftool": "^0.0.3",
"farmhash": "^2.0.4",
"fs-extra": "^4.0.1",
"graceful-fs": "^4.1.11",
"hashids": "^1.1.1",
@ -52,6 +51,7 @@
"uuid": "^3.1.0",
"uuid-parse": "^1.0.0",
"ws": "^3.1.0",
"xxhash": "^0.2.4",
"yazl" : "^2.4.2"
},
"devDependencies": {},