cot icon indicating copy to clipboard operation
cot copied to clipboard

Allow batch operations to reduce repeated file read/write cost

Open glennmatthews opened this issue 10 years ago • 2 comments

The slowest part of COT is the actual file I/O [citation needed], especially when untarring and retarring an OVA file is required. This makes multi-stage operations like the following somewhat slow since the file is re-written and re-read repeatedly:

cot edit-hardware foo.ova --cpus 4
cot edit-properties foo.ova ...
cot inject-config config.txt foo.ova
cot info foo.ova

While COT is explicitly designed around separation of actions (so that the params defined for "edit-hardware" do not conflict with the params for "add-disk", etc.), it would be nice to provide for some mechanism of batching operations together with only a single "read" at the beginning and a single "write" at the end.

glennmatthews avatar Jan 05 '15 15:01 glennmatthews

http://stackoverflow.com/questions/10448200/how-to-parse-multiple-sub-commands-using-python-argparse may be relevant

glennmatthews avatar Jan 08 '15 20:01 glennmatthews

This should be less of an issue if #39 is fixed to reduce unnecessary copies/read/write operations.

glennmatthews avatar Aug 05 '15 19:08 glennmatthews