From 2987e25ad599fe7f13043b860ac9237e40a196ef Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Tue, 5 Oct 2010 09:52:00 -0700 Subject: Read 4M at once, as opposed to 1M. --- lognotify.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lognotify.rb') 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 -- cgit v1.2.3-70-g09d2