From: Jacob Lifshay Date: Wed, 14 Jun 2023 05:53:52 +0000 (-0700) Subject: cache get_csv X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=308db1f94cc5031371dad30248fc3041c7741b09;p=openpower-isa.git cache get_csv --- diff --git a/src/openpower/decoder/power_enums.py b/src/openpower/decoder/power_enums.py index 6e32fb99..fb90b135 100644 --- a/src/openpower/decoder/power_enums.py +++ b/src/openpower/decoder/power_enums.py @@ -40,6 +40,12 @@ def find_wiki_file(name): def get_csv(name): + retval = _get_csv(name) + return [i.copy() for i in retval] + + +@functools.lru_cache() +def _get_csv(name): """gets a not-entirely-csv-file-formatted database, which allows comments """ file_path = find_wiki_file(name)