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:
parent
95de60fd86
commit
9492be4899
1 changed files with 1 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue