Cache the result of get_files into variable _files.

get_files is a slow method, and there are lots of calls to it
throughout the code. Not changing any methods to use this cached
value just yet, but it really helps in the REPL at least.
This commit is contained in:
Ethan Dalool 2020-10-01 11:23:41 -07:00
parent 95de60fd86
commit 9492be4899

View file

@ -395,6 +395,7 @@ class Mega:
# ensure each file has a name before returning
if processed_file['a']:
files_dict[file['h']] = processed_file
self._files = files_dict
return files_dict
def get_upload_link(self, file):