{"id":12062,"date":"2015-08-22T09:30:37","date_gmt":"2015-08-22T13:30:37","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=12062"},"modified":"2015-08-22T09:30:37","modified_gmt":"2015-08-22T13:30:37","slug":"making-tab-switching-and-scrolling-faster-in-omnifocus-for-mac","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2015\/08\/22\/making-tab-switching-and-scrolling-faster-in-omnifocus-for-mac\/","title":{"rendered":"Making Tab-Switching and Scrolling Faster in OmniFocus for Mac"},"content":{"rendered":"<p><a href=\"https:\/\/www.omnigroup.com\/developer\/making-tab-switching-and-scrolling-faster-in-omnifocus-for-mac\">Brent Simmons<\/a>:<\/p>\n<blockquote cite=\"https:\/\/www.omnigroup.com\/developer\/making-tab-switching-and-scrolling-faster-in-omnifocus-for-mac\"><p>Setting up and tearing down the KVO observations isn&rsquo;t a big deal, though. I was wrong about that. Updating the contents of a cell view <em>is<\/em> a big deal, however, and this is done when cells are recycled &mdash; but this is mainly a big deal because it triggers layout, which is slow.<\/p>\n<p>So here&rsquo;s what Instruments told me: NSStackView is slow (at least in our case).<\/p>\n<p>But it also told me something else that completely surprised me: the app was spending a whole bunch of time setting and tearing down NSTrackingAreas.<\/p><\/blockquote>\n<p>He also replaced <code>-enumerateObjectsUsingBlock:<\/code> with a <code>for<\/code> loop.<\/p>","protected":false},"excerpt":{"rendered":"<p>Brent Simmons: Setting up and tearing down the KVO observations isn&rsquo;t a big deal, though. I was wrong about that. Updating the contents of a cell view is a big deal, however, and this is done when cells are recycled &mdash; but this is mainly a big deal because it triggers layout, which is slow. [&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":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","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":[4],"tags":[200,69,30,32,54,526,138,71],"class_list":["post-12062","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-autolayout","tag-cocoa","tag-mac","tag-macapp","tag-objective-c","tag-omnifocus","tag-optimization","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12062","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=12062"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12062\/revisions"}],"predecessor-version":[{"id":12063,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12062\/revisions\/12063"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=12062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=12062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=12062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}