Create temporary directories on disk and not in RAM
ClosedPublic

Authored by elvisangelaccio on Dec 30 2015, 11:28 AM.

Details

Summary

Currently CliInterface::copyFiles() creates a temporary directory in /tmp, upon extraction of one or more selected files.
This does not scale well on systems where /tmp is mounted in RAM, if the RAM is low or if the archive has huge files.

We can simply create the temporary directory on disk. We only need to be sure that the temp dir is created on the same disk where the final destination is (otherwise we write each (possibly huge) file twice).

Test Plan

The QTemporaryDir is created on the same disk where the final destination is, and it autodeletes itself upon destruction.
Extracting huge files does not fill the RAM anymore.

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
elvisangelaccio retitled this revision from to Create temporary directories on disk and not in RAM.
elvisangelaccio updated this object.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
elvisangelaccio set the repository for this revision to R36 Ark.
elvisangelaccio added a project: Ark.
Restricted Application added a subscriber: kde-utils-devel. · View Herald TranscriptDec 30 2015, 11:28 AM

Rebased on top of current master.

rthomsen accepted this revision.Mar 5 2016, 6:50 PM
rthomsen edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Mar 5 2016, 6:50 PM