
Why NetNewsWire Is Fast - mrzool
https://inessential.com/2020/05/18/why_netnewswire_is_fast
======
rvz
NetNewsWire is another great example of quality open source Mac applications
that don't force my laptop in 100% CPU utilization, especially for RSS
readers.

Given that the author did a recent article about technical programming
interviews, I'd pretty much see this article as enough evidence that the
author here knows their stuff in data structures appropriately and also
optimising apps beyond his own ones and would bypass the programming interview
stage anyway. (All this code is open-source in NetNewsWire).

Great article and nice work on NetNewsWire!

~~~
WaltPurvis
Wow, I had no idea NetNewsWire had become free and open source. I stopped
using it after v3 (because v4 removed some AppleScript functionality I
depended on, although I now can't even remember what it was) and completely
missed the news that a free v5 had been released, and open source to boot.
This is fantastic!

------
abhayb
I love the detail in the post! A lot of this seems to boil down to the author
being able to drop to a lower level of abstraction when necessary. I'm curious
to know how they got that facility. Did they dig deep when they found
something was slow? Or did they do a bunch of research before hand? Maybe the
higher level tooling didn't exist when they started working on the platform so
they had to pick things up out of necessity?

~~~
toast0
> A lot of this seems to boil down to the author being able to drop to a lower
> level of abstraction when necessary. I'm curious to know how they got that
> facility. Did they dig deep when they found something was slow? Or did they
> do a bunch of research before hand?

I'm not the author, but I've got this facility as well. I guess part one is to
have motivation --- it's hard to know what to research before hand[1], but if
you've got something that is actively too slow now, that gives you a clear
direction. Part two is not being easily satisfied that things are fast enough,
or fast as you can get. There's almost always a way to make UI faster, it's
just a matter of what needs to break to make it happen, sometimes it's
abstraction layers. You can go back in time and look at 1980s UIs and while
some were slow, many were super fast, and yet the CPUs were slower than dirt
compared to today. We're often marshalling a lot more data and pixels, but it
just shows than processing everything in time for the next frame is a
reasonable target. Learning to use the profiling tools available is a good
concrete first step.

[1] But, don't let that stop you from research into things that are
interesting to you, or seem like they might be useful. Knowing something can
be done is immensely helpful to doing it, even if you don't remember how it
was done.

~~~
abhayb
Ah I wasn't even thinking about motivation! Yeah it makes sense that I'd have
to start with motivation when I'm breaking down a perf problem. I'm reminded
of the talk So you want to be a wizard [1]. It definitely understands what
you're talking about.

[1] [https://jvns.ca/blog/so-you-want-to-be-a-
wizard/](https://jvns.ca/blog/so-you-want-to-be-a-wizard/)

~~~
inimino
Don't forget overcoming fear. SICP helped me most in that I overcame
unconscious barriers of fear of complexity. The only way to defeat those is to
embrace complexity and fight through it.

------
ryanwaggoner
I used to use NetNewsWire like 12-15 years ago, so I was surprised to see it
pop up here in this excellent article.

Turns out this is a completely rewritten app and the NetNewsWire name went on
quite a journey:
[https://inessential.com/2018/08/31/netnewswire_comes_home](https://inessential.com/2018/08/31/netnewswire_comes_home)

------
aaronbrethorst
_Remember that Core Data manages a graph of objects: it’s not a database._

and therein lies the primary reason that I try to never use Core Data if I can
avoid it. I almost always want a database. I almost never want to manage a
graph of objects. If the backends I spoke to were also organized as object
graphs, maybe I’d feel differently about it.

~~~
kitotik
I always thought that using it as basically the db or cache for remote API was
a terrible misuse of CoreData, but a graph of objects _does_ come in handy
when driving complex UIs.

~~~
setpatchaddress
It is absolutely a terrible use of Core Data. Raw sqlite or wrappers are fine
for that and will be considerably less difficult to debug when something goes
wrong.

------
fouc
Imagine if Slack or Discord did any of these at all. Lots of performance gains
to be had.

~~~
dewey
These all have a lot more network overhead than an RSS reader that only has to
periodically fetch a bunch of xml files. I feel like optimizing these kind of
apps is a whole different problem space and a "native" app is probably not
going to change that so much.

~~~
why-oh-why
I hope you’re being sarcastic.

At heart, Slack is a chat app. Chat apps have existed for 40 years and don’t
require a whole lot of data.

The complex part might be displaying the data, but that’s not much different
than what an RSS reader does.

Even calling a chat app “complex” sounds absolutely ludicrous. It’s just that
devs are now used to shipping 100MB apps in the name of fast development, so
Slack is what we get.

~~~
dewey
I'm not sure when you used Slack the last time but there's a lot more than
"just a chat app" and it sounds like one of these "I can build that in a
weekend" comments.

There's video calling, audio calling, screen sharing, file sharing,
permissions, media files sent around. It's not comparable to some old chat app
where you only have to get new messages and display them in a chronological
list.

~~~
mfontani
I'm sure the app has to be able to deal with all that, and that unmistakably
adds a layer of complexity which ought to exhibit _somewhere_.

On the other hand, when using the Slack app as a simple chat app - formatted
text only, a few formatted in-line code snippets, things like that.. the
experience can often be abysmal.

Just the other day, I was typing a _text_ message in a private chat, text only
- no images, no fancy stuff other than a few bold and italics and inline code
tags, and I could visibly measure the delay between typing and the text
appearing on the screen.

That should never happen, regardless of whichever other fancy features the app
_might_ be able to do.

Never.

------
tedunangst
I wouldn't advocate for slower software, but is all of this really necessary
for a fast RSS reader? My RSS reader downloads the entire XML file as blob,
parses it into an array of structs, then walks over the array looking for new
links. It's not particularly slow. I can't imagine it would be worth
optimizing this aspect of the code base.

~~~
nine_k
No optimization is worth the effort before profiling.

If they found out that these operations are responsible for long enough
delays, or high enough energy consumption spikes, it would make all the sense
to optimize them.

~~~
jonstewart
Profiling is good at telling you which parts of your code account for most of
the program’s runtime, but that’s it. It can’t tell you whether the
performance is reasonable relative to the work done, or whether a totally
different approach is necessary. Writing fast code goes well beyond using
profilers, in keeping with the article’s thesis.

~~~
nine_k
Assume you locate a part of code which is 10x as slow as it could be. You make
it 10x faster; great!

But that part only took 1% of the total perceived processing delay, so the
user sees a whooping 0.9% improvement.

------
BooneJS
RSS applications all have a fixed feature set. Subscribe to feeds, check feeds
for updates, organize & sync data for multiple clients, and present user's
reading list to the screen. There are several RSS readers that all tick these
boxes.

NNW is clearly a labor of love for the author who has been involved in macOS
development and RSS for a long time. NNW is unabashedly Mac-only and
unabashedly fast. I love reading about people's passion projects.

------
atonse
I still find Reeder to be the gold standard for a really polished reader.

------
mikece
I just discovered the iOS app for NetNewsWire and I am blown away that it is
only 7.5 MB in size! I did Xamarin development for a while; a blank hello
world application is about 45 MB. Kudos to the team!

------
minimaxir
The relatively new iOS app for NetNewsWire is very good (and free!)

~~~
webwanderings
What is a good use case of such "free" mobile app if the sync feature is
behind a third party paid service? Am I expected to always check my feeds only
on my mobile? How useful is that?

As much as I would use NNW right away but it isn't really a useful service at
this point in time.

~~~
minimaxir
Hmm? The iOS app can be backed by Feedly, which is free. (supposedly that
functionality will go to the desktop version soon.)

~~~
webwanderings
Feedly is limited with free account. The point I'm making is that NNW should
be using its own service to maintain user's "read" states between its desktop
and mobile apps.

I'm not a big innoreader fan but their mobile app is decent and their online
service is synced together. In this case, I never have to worry about my
"read" states getting out of sync.

When it comes to RSS adoption, the read-state needs to be seamless across all
platforms.

~~~
solidsnack9000
It seems like you are saying, you should get this great use case handled for
you, and not have to pay for anything: not for the app or for the service.

~~~
webwanderings
Is that what you read in two of my messages above? Interesting!

BTW, NNW is not charging as of yet. What I was talking about in two of my
messages above, is the adoption issue with disparate platforms without the
availability of read-state feature. If I use NNW mobile, I'm bound to using it
all the time (which is not practical). If I use it's desktop app, I'm bound to
using it on my Mac all the time (again, not practical). Anyone with more than
hundred or more feeds, would find issues adopting such service. I am not here
to defend my likeness of NNW so I won't say anything in this regard.

~~~
WoodenChair
Yeah your comments were not clear. But the reply comment to you made a great
point (that you actually acknowledged, but don't seem to understand underlies
why your point is problematic): NNW is free (in both senses of the word) and
open source software. Brent and the team are not being paid to work on it.
They are using a third party service (Feedly) as a backing store. You have the
option of paying for it, or you have the option of not paying for it. Either
way, if your argument is that NNW lacks a syncing feature you are wrong. And
if your argument is that the syncing feature (Feedly) should be free, then
your argument effectively boils down to "hey people who did this awesome free
software, please make more free software for me." Which is not a strong
argument.

~~~
webwanderings
Here, someone left this(1) link above. This is a better practical response
than just trying to win an argument for the sake of winning an argument.

[https://github.com/Ranchero-
Software/NetNewsWire/issues/491](https://github.com/Ranchero-
Software/NetNewsWire/issues/491)

------
baby
I used to use this, but switched to inoreader due to the mobile app and
because it was easy to use. Is it time to switch back?

~~~
stereo
Yes! The NetNewsWire mobile app is great.

------
manigandham
Any particular reason why this is a local (destop/mobile) app? I use Feedly
and performance was never an issue, with the bonus that content and status is
synced everywhere.

~~~
zapzupnz
I don't want a website open all the time. I don't want to have to be connected
to the internet to read my catalogue of saved articles. I want native
performance, not "good enough" or "not really an issue" performance. I want
100% integration with my system; I want AppleScript-based automation. I want
my system's accessibility settings to determine how I use the content, not
depend on how some website's CSS handles my use cases — not that a lot of
websites, particularly SPAs, are made such that VoiceOver can deal with them.

Those are my reasons why I'd want a local desktop app, anyway.

------
dhhwrongagain
What does the pizza emoji at the end of the article mean?

~~~
jakelazaroff
_> Make sure, in other words, that performance isn’t just a topping — it’s the
pizza._

------
D13Fd
I’m looking forward to them eventually supporting Inoreader sync.

~~~
Hamuko
I'm waiting for Feedly support.

~~~
hylaride
Strangely, the iOS version supports feedly, but the desktop version doesn’t.

~~~
dewey
That's because it's a small project and they have to prioritize pretty
strictly, highly recommend following the blog where he always posts updates.

I'm sure it's "just" a matter of time.

------
dirtylowprofile
I used to use NNW but one time my 2 year old kid just did a one quick swipe on
my phone’s screen while NNW is open and just deleted the whole content. I’m
not sure what gesture made it happen but I switched back to Feedly.

~~~
Wevah
You can shake/three-finger-swipe to undo deletions, though it’s not very
obvious.

