From 2be33e74537d1d37d2cce8a01b96da0531acfe70 Mon Sep 17 00:00:00 2001 From: Andrey Arapov Date: Tue, 22 Sep 2015 11:33:06 +0200 Subject: [PATCH] largest bottleneck indicated - awk --- ocdec.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ocdec.sh b/ocdec.sh index 4262c7d..1388c2f 100755 --- a/ocdec.sh +++ b/ocdec.sh @@ -28,7 +28,7 @@ # - ownCloud 8.1.3 # # Limitations: -# - it is really really slow +# - it is really really slow (the largest bottleneck is in awk part of the script) # # # === Usage notes @@ -127,7 +127,9 @@ function decryptFile() { # --- Get the FileKey --- # --- Decrypt the file --- - # TODO: to figure out how to speed-up the decryption process + # TODO: to figure out how to speed-up the decryption process. + # bottlenecks: + # - awk is running really slow, consuming lot of CPU encFileContentsALL="$(cat "${USER}/$encFilePath")" encFileContentsNOHEAD=$(echo -n "$encFileContentsALL" | sed -r 's/^HBEGIN:.+:HEND-*//') N=0