summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2010-10-05 09:52:00 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2010-10-05 09:52:00 -0700
commit2987e25ad599fe7f13043b860ac9237e40a196ef (patch)
treeff89f104e81c19caf1f83503504c48d9db652d1e
parent7d98f54e121465da316973019794ce8844658d65 (diff)
downloadlognotify-master.tar.gz
lognotify-master.tar.xz
Read 4M at once, as opposed to 1M.HEADmaster
-rwxr-xr-xlognotify.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lognotify.rb b/lognotify.rb
index 8ec2a10..e83465f 100755
--- a/lognotify.rb
+++ b/lognotify.rb
@@ -80,8 +80,8 @@ def count_lines identifier
count = 0
File.open(identifier.to_cache_path) do |file|
- # Process lines block-by-block to keep memory usage low.
- while block = file.read(1024)
+ # Process file block-by-block to keep memory usage low.
+ while block = file.read(4096)
count += block.count("\n")
end
end