{"id":28970,"date":"2020-05-19T15:43:11","date_gmt":"2020-05-19T19:43:11","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=28970"},"modified":"2020-05-25T14:22:06","modified_gmt":"2020-05-25T18:22:06","slug":"why-netnewswire-is-fast","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2020\/05\/19\/why-netnewswire-is-fast\/","title":{"rendered":"Why NetNewsWire Is Fast"},"content":{"rendered":"<p><a href=\"https:\/\/inessential.com\/2020\/05\/18\/why_netnewswire_is_fast\">Brent Simmons<\/a> (<a href=\"https:\/\/twitter.com\/brentsimmons\/status\/1262537912886984706\">tweet<\/a>):<\/p>\n<blockquote cite=\"https:\/\/inessential.com\/2020\/05\/18\/why_netnewswire_is_fast\"><p>The parsers are fast &mdash; but we also do our best to skip parsing entirely when we can. There are two ways we do that.<\/p>\n<p>We use <a href=\"https:\/\/fishbowl.pastiche.org\/2002\/10\/21\/http_conditional_get_for_rss_hackers\">conditional GET<\/a>, which gives the server the chance to respond with a 304 Not Modified, and no content, when a feed hasn&rsquo;t changed since the last time we asked for it.<\/p>\n<\/blockquote>\n<p>This is wonderful in theory, but it doesn&rsquo;t seem to work consistently with my blog. I&rsquo;ve <a href=\"https:\/\/redbot.org\/?uri=https%3A%2F%2Fmjtsai.com%2Fblog%2Ffeed%2F\">tested<\/a> it, and the logs show that a few percent of NetNewsWire users <em>are<\/em> getting 304-cached content, but the vast majority are not. This may be a WordPress issue.<\/p>\n\n<p><a href=\"https:\/\/github.com\/Automattic\/wp-super-cache\/blob\/master\/readme.txt\">WP Super Cache<\/a>:<\/p>\n<blockquote cite=\"https:\/\/github.com\/Automattic\/wp-super-cache\/blob\/master\/readme.txt\">\n<p>Supercache doesn&rsquo;t support 304 header checks in Expert mode but does support it in Simple mode.<\/p>\n<\/blockquote>\n\n<p>I think at one point it worked when I hacked WP Super Cache to cache feeds using mod_rewrite, but currently I&rsquo;m using the unmodified version in Simple mode.<\/p>\n\n<p>Back to <a href=\"https:\/\/inessential.com\/2020\/05\/18\/why_netnewswire_is_fast\">Simmons<\/a>:<\/p>\n<blockquote cite=\"https:\/\/inessential.com\/2020\/05\/18\/why_netnewswire_is_fast\"><p>The same API that marks a single article as read is used to mark 10,000 articles as read. This way the database is updated once, the unread counts are updated once, and we push just one action on the undo stack.<\/p><\/blockquote>\n<p>The Cocoa frameworks <em>can<\/em> provide all sorts of notification and undo functionality almost for free, but to get bulk operations right you need to do it by hand.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2020\/05\/11\/rss-readers-rejected-from-the-app-store\/\">RSS Readers Rejected From the App Store<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2019\/07\/26\/fast-software-the-best-software\/\">Fast Software, the Best Software<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2010\/02\/26\/on-switching-away-from-core-data\/\">On Switching Away From Core Data<\/a><\/li>\n<\/ul>\n\n<p id=\"why-netnewswire-is-fast-update-2020-05-25\">Update (2020-05-25): See also: <a href=\"https:\/\/news.ycombinator.com\/item?id=23286362\">Hacker News<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Brent Simmons (tweet): The parsers are fast &mdash; but we also do our best to skip parsing entirely when we can. There are two ways we do that. We use conditional GET, which gives the server the chance to respond with a 304 Not Modified, and no content, when a feed hasn&rsquo;t changed since the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2020-05-19T19:43:14Z","apple_news_api_id":"c698127a-95c6-46da-80cd-224864e7a876","apple_news_api_modified_at":"2020-05-25T18:22:10Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAQ==","apple_news_api_share_url":"https:\/\/apple.news\/AxpgSepXGRtqAzSJIZOeodg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[544,200,69,109,30,32,1666,392,138,71,52,425,1659,96,740],"class_list":["post-28970","post","type-post","status-publish","format-standard","hentry","category-technology","tag-apache","tag-autolayout","tag-cocoa","tag-coredata","tag-mac","tag-macapp","tag-macos-10-15","tag-netnewswire","tag-optimization","tag-programming","tag-rss","tag-sqlite","tag-this-blog","tag-web","tag-wordpress"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/28970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=28970"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/28970\/revisions"}],"predecessor-version":[{"id":29032,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/28970\/revisions\/29032"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=28970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=28970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=28970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}