From 0282c0463d975c48d9cdda429690a36544941e97 Mon Sep 17 00:00:00 2001 From: vilicvane Date: Wed, 10 Feb 2016 08:50:22 +0800 Subject: [PATCH] Revert hash object caching --- src/compiler/sys.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 9f7903d4201..99008d4cc7e 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -229,7 +229,6 @@ namespace ts { const _path = require("path"); const _os = require("os"); const _crypto = require("crypto"); - let hash: any; // average async stat takes about 30 microseconds // set chunk size to do 30 files in < 1 millisecond @@ -569,10 +568,7 @@ namespace ts { } }, createHash(data) { - if (!hash) { - hash = _crypto.createHash("md5"); - } - + const hash = _crypto.createHash("md5"); hash.update(data); return hash.digest("hex"); },