Closed macmpi closed 7 years ago
We can use a simple native call to unzip.. We need to add it into recipes and then call it with execsync
minizip (miniunzip) is usually quite efficient tiny package.
Quite some changes to do in pluginmanager still, to wrap-it nicely, and optimize /tmp
intermediate file cleanup...
Ok!
@volumio
While at it, I realize fs.move
( in renameFolder
and moveToCategory
for instance) duplicates files instead of doing filesystem mv
.
For big plugin folders, that makes a significant difference in terms of memory footprint & flash usage.
Since portability is secondary (all linux) and we do only move data within same filesystem for plugin install, would it be acceptable to use more optimal mv
command here which does not actually rewrite/duplicate data?
Thanks for feedback.
It very much seems unzipping plugin archive with
decompress-zip
can easily generate critical low-memory conditions and also getsnode
process to take nearly all CPU. This can be seen on lower specked Pis (PiZero for instance) and big plugins likeYoutube
. Sometimes install will just crash after being blocked for a while right afterCreating folder on disk
message.Maybe some other zip deflating node package may have better memory & CPU management (or deflating could be done natively)? BTW deflating directly into
/data/plugins/...
would also save RAM in/tmp
, and more aggressive intermediate files cleanup strategies in/tmp
might also help... (as pointed here)sample log below: