gorn.ch

Tobias Ebnöther's personal blog

NetNewsWire Lite vs Vienna memory usage

Today I tried to optimize my memory usage a little since OS X is swapping a lot. I switched from Vienna to NetNewsWire about two months ago because Vienna used to crash a lot, what seems to be fixed now. I decided to test which one uses less memory and just use that.

Both clients are scanning the same ~100 feeds every 30mins. For the test I will mark every entry as read "one by one" (vie space key) and don't use the flag features etc. (not available in NetNewsWire Lite anyways). I started to monitore the memory usage like that:
echo "`date +%s`;`ps cux | egrep 'Vienna|NetNewsWire' |\
awk -v ORS=';' '{print $11 ";" $5 ";" $6}'`"

Soon I realized that output wouldn't be easy to plot, then I decided to write a little script and run it via launchd every 30s. Here is the code:

#!/bin/bash
echo -n "`date +%s`;"

for arg in "$@"; do
MEM=`ps cux | grep $arg | awk '{print $5 ";" $6 ";"}'`;
if [ -z $MEM ]; then
echo -n ";;";
else
echo -n $MEM
fi
done
Use it like that:
memory.sh NetNewsWire Vienna
After 24h of data collection I decided to stop the test and see the result. I like gnuplot to visualize my data so here is the setup:
set terminal png
set output rss_readers.png
set key top left box
set ytics 2.5
set grid y
set ylabel 'MB Memory'
unset xtics
set datafile separator ';'
plot "memorystats.txt" using ($3/1024) title 'NetNewsWire Lite' with lines,\
"memorystats.txt" using ($5/1024) title 'Vienna' with lines

And that's the Result:
Low High Average
NetNewsWire Lite 20.16 68.00 44.59
Vienna 22.96 68.35 41.28
Nearly the same memory usage.
As you can see the memory usage is nearly the same and both are slowly consuming more memory over the time (24h - some hours in hibernate).

Conclusion:
  • Missing data on the time axis (hibernate hours) sucks. I can probably do a little more tuning with gnuplot but didn't try to manipulate axes by now. [Give me a hint if you're good with gnuplot, I'd like to just skip those parts in the axis.]
  • Both RSS Readers are consuming nearly the same amount of memory, growing over time.
  • After having Vienna back for the first couple of hours I already decided to prefer it over NNW Lite. I regularly missed the search and flag functions.
Related Entries:
Nice screenrc and common keystokes
Living with Terminal.app
Fixing the delete key in Terminal.app
tail -f to growl
xchat on OSX / Command as alt
Comments (1)  Permalink

Nice screenrc and common keystokes

I like to work with screen because I can easily switch between different virtual consoles and attach them somewhere else if needed. So here is how I setup my screenrc:

vbell off                  #Don't display the wuff wuff stuff
defutf8 on #Turn on UTF-8 by default
shelltitle "$ |bash" #Standard Shell title will be replaced by bash
caption always #I never use split view but like the caption
caption string "%{= wk}%w" #Show me all opened consoles with white on black

Add this to your .bashrc to get nice console names (usually the runnig programm):

export PROMPT_COMMAND='echo -ne "\ek\e\\"'

Here are the keystokes I use very often:

Create new console:        ^A c
Get to next console: ^A n
Go to last console: ^A a
Go to specific console: ^A <consolenumber>
Deattach screen: ^A d
Related Entries:
NetNewsWire Lite vs Vienna memory usage
Living with Terminal.app
Fixing the delete key in Terminal.app
tail -f to growl
xchat on OSX / Command as alt
Comments (1)  Permalink
1-2/2
Powered by Flux CMS