<titledata-rh="true">Tips & Tricks | SketchyBar</title><metadata-rh="true"name="twitter:card"content="summary_large_image"><metadata-rh="true"property="og:url"content="https://felixkratz.github.io//SketchyBar/config/tricks"><metadata-rh="true"name="docusaurus_locale"content="en"><metadata-rh="true"name="docsearch:language"content="en"><metadata-rh="true"name="docusaurus_version"content="current"><metadata-rh="true"name="docusaurus_tag"content="docs-default-current"><metadata-rh="true"name="docsearch:version"content="current"><metadata-rh="true"name="docsearch:docusaurus_tag"content="docs-default-current"><metadata-rh="true"property="og:title"content="Tips & Tricks | SketchyBar"><metadata-rh="true"name="description"content="Batching of configuration commands"><metadata-rh="true"property="og:description"content="Batching of configuration commands"><linkdata-rh="true"rel="icon"href="/SketchyBar/img/favicon.ico"><linkdata-rh="true"rel="canonical"href="https://felixkratz.github.io//SketchyBar/config/tricks"><linkdata-rh="true"rel="alternate"href="https://felixkratz.github.io//SketchyBar/config/tricks"hreflang="en"><linkdata-rh="true"rel="alternate"href="https://felixkratz.github.io//SketchyBar/config/tricks"hreflang="x-default"><linkrel="stylesheet"href="/SketchyBar/assets/css/styles.d31a9c85.css">
color.</p><div><divstyle="padding:5px;background:#fff;-ms-border-radius:1px;-moz-border-radius:1px;-o-border-radius:1px;-webkit-border-radius:1px;border-radius:1px;-ms-box-shadow:0 0 0 1px rgba(0,0,0,.1);-moz-box-shadow:0 0 0 1px rgba(0,0,0,.1);-o-box-shadow:0 0 0 1px rgba(0,0,0,.1);-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.1);box-shadow:0 0 0 1px rgba(0,0,0,.1);display:inline-block;cursor:pointer"><divstyle="width:36px;height:14px;-ms-border-radius:2px;-moz-border-radius:2px;-o-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;background:rgba(241, 112, 19, 1)"></div></div><divid="color">Try the Picker!</div></div><h2class="anchor anchorWithStickyNavbar_mojV"id="performance-optimizations">Performance optimizations<aclass="hash-link"href="#performance-optimizations"title="Direct link to heading"></a></h2><p><em>SketchyBar</em> can be configured to have a <em>very</em> small performance footprint. In the following I will highlight some optimizations that can be used to reduce the footprint further. </p><ul><li>Batch together configuration commands where ever possible.</li><li>Set items to be <em>lazy</em>, e.g. I have an alias component in my bar that updates every <em>2</em> seconds, thus I set all <em>non-reactive</em> items to <em>lazy=on</em>,
and only the ones that should react to change instantaneously to <em>lazy=off</em>.</li><li>Set <em>updates=when_shown</em> for items that do not need to run their script if they are not rendered.</li><li>Reduce the <em>update_freq</em> of <em>scripts</em> and <em>aliases</em> and use event-driven scripting when ever possible.</li><li>Do not add <em>aliases</em> to apps that are not always running, otherwise sketchybar searches for them continously.</li></ul></div></article><navclass="pagination-nav docusaurus-mt-lg"aria-label="Docs pages navigation"><divclass="pagination-nav__item"><aclass="pagination-nav__link"href="/SketchyBar/config/types"><divclass="pagination-nav__sublabel">Previous</div><divclass="pagination-nav__label">Type Nomenclature</div></a></div><divclass="pagination-nav__item pagination-nav__item--next"><aclass="pagination-nav__link"href="/SketchyBar/credits"><divclass="pagination-nav__sublabel">Next</div><divclass="pagination-nav__label">Credits</div></a></div></nav></div></div><divclass="col col--3"><divclass="tableOfContents_cNA8 thin-scrollbar theme-doc-toc-desktop"><ulclass="table-of-contents table-of-contents__left-border"><li><ahref="#batching-of-configuration-commands"class="table-of-contents__link toc-highlight">Batching of configuration commands</a></li><li><ahref="#color-picker"class="table-of-contents__link toc-highlight">Color Picker</a></li><li><ahref="#performance-optimizations"class="table-of-contents__link toc-highlight">Performance optimizations</a></li></ul></div></div></div></div></main></div></div></div>