From 59173296aba560377f55dcc0527f2ddbb6c8d2ac Mon Sep 17 00:00:00 2001 From: Aaron Ball Date: Wed, 14 Feb 2018 08:47:22 -0700 Subject: install-header:changed dd extraction block size Previously, we extracted block=1B * sizeof(chunk). This was extremely slow. Changing block size to sizeof(chunk) and count to 1, the process is sped up by about 200x. --- install-header.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install-header.sh b/install-header.sh index a7b9269..b54a0ec 100755 --- a/install-header.sh +++ b/install-header.sh @@ -8,6 +8,8 @@ export SELF # Absolute path to the installer script (me!) export TMP # Path to tmp install staging directory export PAYLOAD # Path to the extracted payload directory export NOCLEANUP # Do not clean up deploy resources. Useful for debugging +export COMPRESS # Command to compress data +export DECOMPRESS # Command to decompress data # Header: 0 # runscript: 1 @@ -25,7 +27,7 @@ extract_chunk_index() { [ "${dest}" != '-' ] && of="of=${dest}" # Extract the requested chunk index - dd bs=1 count=${LENS[$index]} iflag=skip_bytes skip=${skip} \ + dd bs=${LENS[$index]} count=1 iflag=skip_bytes skip=${skip} \ if=${src} ${of} 2>/dev/null } -- cgit v1.2.3