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 "[email protected]"; 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 |

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.