I have an object (defaultdict) with structure: { srting : [(string, (float, float)), (string, (float, float)), ....]}
The size of it is about 12,5 MB
I am pickling with code:
with open(Path_to_file, 'wb') as file:
pickle.dump(data_dict, file)
Pickle file weights about 300 MB. In proccess unpickling with code:
with open(Path_to_file, 'rb') as file:
data_dict_new = pickle.load(file)
system is using a lot of RAM (about 3,5 GB and more). But after unpickling Python uses about 1 GB of RAM.
So I have two questions:
- What does keep in RAM apart of my structure?
- How can I clean it?
gc.collect() doesn't help.