From b2851ebac98cdf851591be1000a02ed5bba2559e Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 5 Jun 2016 17:34:10 -0700 Subject: [PATCH] Remove some premature optimization --- minheader.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/minheader.py b/minheader.py index 453af4a..1b77be4 100755 --- a/minheader.py +++ b/minheader.py @@ -1,7 +1,6 @@ #!/usr/bin/python3 import argparse -import functools import os import re import subprocess @@ -45,7 +44,6 @@ class MinHeader(object): def Minify(self, path): self._Log('%s:\n' % path) - self._ClearCaches() assert(self._TestPasses()) known_required = {} while self._MinifyPass(path, known_required): @@ -78,9 +76,6 @@ class MinHeader(object): def _Log(self, msg): print(msg, file=sys.stderr, flush=True, end='') - def _ClearCaches(self): - self._FindSubIncludes.cache_clear() - def _LoadFile(self, path): with open(path, 'r') as fh: return list(fh) @@ -114,7 +109,6 @@ class MinHeader(object): ret.append((i, match.group('include_path'))) return ret - @functools.lru_cache() def _FindSubIncludes(self, path): full_path = self._FindFile(path) return [x[1] for x in self._FindIncludes(self._LoadFile(full_path))]