PrivateFile::basic_mv
and PrivateFile::cp
load full file content in memory
#242
Labels
PrivateFile::basic_mv
and PrivateFile::cp
load full file content in memory
#242
PrivateFile::attach
is called bybasic_mv
andcp
to attach a node to a new location in the directory hierarchy.Through
PrivateNode::update_ancestry
it goes toPrivateFile::prepare_key_rotation
which contains these lines to reencrypt the file content:This will load the full (decrypted) file content into memory and therefore can easily exhaust available memory for large files and/or constrained devices.
Instead this could use
PrivateFile::stream_content
andPrivateFile::prepare_content_streaming
so that not all of the file content has to be in memory at the same time. Maybe it would need some logic to read with the old key and label and write with the new key and label. Or the file could be cloned maybe.The text was updated successfully, but these errors were encountered: