<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.5.2">Jekyll</generator><link href="http://blog.atom.io/feed.xml" rel="self" type="application/atom+xml" /><link href="http://blog.atom.io/" rel="alternate" type="text/html" /><updated>2017-09-13T02:06:58+00:00</updated><id>http://blog.atom.io/</id><title type="html">blog.atom.io</title><subtitle>A hackable text editor for the 21st Century</subtitle><entry><title type="html">Atom 1.20</title><link href="http://blog.atom.io/2017/09/12/atom-1-20.html" rel="alternate" type="text/html" title="Atom 1.20" /><published>2017-09-12T00:00:00+00:00</published><updated>2017-09-12T00:00:00+00:00</updated><id>http://blog.atom.io/2017/09/12/atom-1-20</id><content type="html" xml:base="http://blog.atom.io/2017/09/12/atom-1-20.html">&lt;p&gt;&lt;img src=&quot;/img/posts/release-1-20.png&quot; alt=&quot;Atom 1.20&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Atom 1.20 is available on the stable channel today and features numerous improvements in the &lt;code class=&quot;highlighter-rouge&quot;&gt;github&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;find-and-replace&lt;/code&gt;, and &lt;code class=&quot;highlighter-rouge&quot;&gt;language-php&lt;/code&gt; packages.&lt;/p&gt;

&lt;!--more--&gt;

&lt;h3 id=&quot;git-integration-improvements&quot;&gt;Git Integration Improvements&lt;/h3&gt;

&lt;p&gt;The way diff views get opened &lt;a href=&quot;https://github.com/atom/github/pull/1016&quot;&gt;was reworked&lt;/a&gt; resulting in pending pane support and multiple simultaneous diff views:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/posts/multiple-diff-views.gif&quot; alt=&quot;Multiple Diff Views&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We’ve also enabled composing commit messages in the main editor for those not into the whole brevity thing.&lt;/p&gt;

&lt;h3 id=&quot;find-and-replace&quot;&gt;Find and Replace&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/atom/find-and-replace/pull/908&quot;&gt;Context lines&lt;/a&gt; are now optionally displayed with Find in Project results. You can set the number of available lines before and after matches in the package settings and modify their display inline when looking at the results.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/posts/find-and-replace-context.png&quot; alt=&quot;Find and Replace Context&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;other-enhancements&quot;&gt;Other Enhancements&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/language-php/pulls?utf8=%E2%9C%93&amp;amp;q=is%3Apr%20is%3Aclosed%20merged%3A2017-06-08..2017-08-03&quot;&gt;Dozens of fixes&lt;/a&gt; for PHP grammar support were made in the &lt;code class=&quot;highlighter-rouge&quot;&gt;language-php&lt;/code&gt; package.&lt;/li&gt;
  &lt;li&gt;CSS autocomplete &lt;a href=&quot;https://github.com/atom/autocomplete-css/pull/80&quot;&gt;now supports PostCSS&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Support has been added to bracket-matcher for &lt;a href=&quot;https://github.com/atom/bracket-matcher/pull/294&quot;&gt;code embedded in strings&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;We’ve added an &lt;a href=&quot;https://github.com/atom/atom/pull/14736&quot;&gt;API for observing dock visibility&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;!-- release notes --&gt;

&lt;p&gt;Don’t forget to check out all the other improvements shipping with this version in the &lt;a href=&quot;https://github.com/atom/atom/releases/tag/v1.20.0&quot;&gt;release notes&lt;/a&gt;! :memo:&lt;/p&gt;

&lt;h2 id=&quot;atom-121-beta&quot;&gt;Atom 1.21 Beta&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/img/release-beta.png&quot; alt=&quot;Atom Beta&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Today’s beta release of Atom 1.21 features Language Server Protocol support, the first of many deeper language integration features, which we’re calling &lt;a href=&quot;https://atom.io/ide&quot;&gt;Atom IDE&lt;/a&gt;. It also includes a new, unified filesystem watcher API and build status indicators.&lt;/p&gt;

&lt;h3 id=&quot;language-server-integration-and-atom-ide&quot;&gt;Language Server Integration and Atom IDE&lt;/h3&gt;

&lt;p&gt;Atom’s been straddling the fence between text editor and IDE for years. We’ve come to believe that a benefit of Atom’s hyper-modular architecture is that users who want more IDE features can have them without affecting the experience of those who don’t. Atom 1.21 takes the first step down this path with &lt;a href=&quot;http://langserver.org/&quot;&gt;Language Server Protocol&lt;/a&gt; support and ready-made integrations with five existing language servers. Check out the &lt;a href=&quot;announcing-atom-ide.html&quot;&gt;Atom IDE post&lt;/a&gt; for details.&lt;/p&gt;

&lt;h3 id=&quot;filesystem-watcher-api&quot;&gt;Filesystem Watcher API&lt;/h3&gt;

&lt;p&gt;Atom and its ecosystem of packages use a number of npm packages to watch the file system for changes. As we worked on the Git integration and Language Server support this patchwork approach left us wanting something simpler and more reliable across platforms. Atom 1.21 includes the first version of this new API. While the underlying implementation is still under development the API itself is stable and ready for use and feedback from package authors.&lt;/p&gt;

&lt;h3 id=&quot;more-github-pr-events-and-build-status&quot;&gt;More GitHub PR Events and Build Status&lt;/h3&gt;

&lt;p&gt;The GitHub integration continues to get richer in this release. We’ve added new PR timeline events and PR build status.&lt;/p&gt;

&lt;h3 id=&quot;other-notable-changes&quot;&gt;Other Notable Changes&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/pull/14711&quot;&gt;MacOS native tabs&lt;/a&gt; are now supported.&lt;/li&gt;
  &lt;li&gt;We &lt;a href=&quot;https://github.com/atom/atom/pull/14682&quot;&gt;restored Atom’s ASAR archive&lt;/a&gt; to improve performance in several scenarios, most notably installation on Windows.&lt;/li&gt;
  &lt;li&gt;Lots of language-specific grammar improvements were made, including the &lt;a href=&quot;https://github.com/atom/language-typescript&quot;&gt;addition of TypeScript&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;!-- release notes --&gt;

&lt;p&gt;There are many more fixes and enhancements detailed in the &lt;a href=&quot;https://github.com/atom/atom/releases/tag/v1.21.0-beta0&quot;&gt;release notes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Get all these improvements today by joining the &lt;a href=&quot;https://atom.io/beta&quot;&gt;Atom Beta Channel&lt;/a&gt;!&lt;/p&gt;</content><author><name>iolsen</name></author><summary type="html">Atom 1.20 is available on the stable channel today and features numerous improvements in the github, find-and-replace, and language-php packages.</summary></entry><entry><title type="html">Introducing Atom-IDE</title><link href="http://blog.atom.io/2017/09/12/announcing-atom-ide.html" rel="alternate" type="text/html" title="Introducing Atom-IDE" /><published>2017-09-12T00:00:00+00:00</published><updated>2017-09-12T00:00:00+00:00</updated><id>http://blog.atom.io/2017/09/12/announcing-atom-ide</id><content type="html" xml:base="http://blog.atom.io/2017/09/12/announcing-atom-ide.html">&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/378023/29239014-9366bfa6-7f7d-11e7-9e04-e5cd535c3a5f.png&quot; alt=&quot;Atom IDE&quot; /&gt;&lt;/p&gt;

&lt;p&gt;GitHub, &lt;a href=&quot;https://nuclide.io/blog/2017/09/12/Introducing-Atom-IDE-UI&quot;&gt;in collaboration with Facebook&lt;/a&gt;, are pleased to announce the launch of Atom-IDE - a set of optional packages to bring IDE-like functionality to Atom.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;The start of this journey includes smarter context-aware auto-completion as well as a host of code navigation features such as an outline view, go to definition, find all references as well as other useful functions such as hover-to-reveal information, errors and warnings (diagnostics) and document formatting.&lt;/p&gt;

&lt;p&gt;Our initial release includes packages for TypeScript, Flow, JavaScript, Java, C# and PHP that utilize the power of language servers to provide deep syntactical analysis of your code and projects.  The &lt;a href=&quot;http://langserver.org/&quot;&gt;language server protocol&lt;/a&gt; is being adopted by a number of organizations including Microsoft, Eclipse, Sourcegraph, Palantir, Red Hat, Facebook and now GitHub too!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/378023/29859731-741403be-8d9e-11e7-99c5-6b914e3fff9c.png&quot; alt=&quot;Atom IDE Screenshot&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;get-started&quot;&gt;Get started&lt;/h1&gt;

&lt;p&gt;We strongly recommended you use &lt;strong&gt;Atom Beta 1.21&lt;/strong&gt; as it includes the necessary file monitoring and process control to ensure the underlying language servers are running properly.&lt;/p&gt;

&lt;p&gt;You’ll need to install at least two packages - the user interface for Atom IDE and a package that support the language you wish to use:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Bring up Atom’s &lt;em&gt;Install Packages&lt;/em&gt; dialog (Settings View: Install Packages and Themes)&lt;/li&gt;
  &lt;li&gt;Search for and install the &lt;a href=&quot;https://atom.io/packages/atom-ide-ui&quot;&gt;atom-ide-ui&lt;/a&gt; package to bring in the IDE user interface&lt;/li&gt;
  &lt;li&gt;Install the IDE language support you need (e.g. &lt;a href=&quot;https://atom.io/packages/ide-typescript&quot;&gt;ide-typescript&lt;/a&gt;) - a summary of the ones available at launch include:&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;typescript--javascript-ide-typescript&quot;&gt;TypeScript &amp;amp; JavaScript (ide-typescript)&lt;/h3&gt;

&lt;p&gt;The &lt;a href=&quot;https://github.com/atom/ide-typescript/&quot;&gt;ide-typescript&lt;/a&gt; package takes advantage of the Microsoft TypeScript server wrapped up in a language server protocol thanks to the work of the team at SourceGraph. While targeted at TypeScript it also works great with JavaScript providing you with autocompletion, document outlines, diagnostics and errors, etc.&lt;/p&gt;

&lt;h3 id=&quot;flow-ide-flowtype&quot;&gt;Flow (ide-flowtype)&lt;/h3&gt;

&lt;p&gt;Our good friends over at Facebook have published &lt;a href=&quot;https://github.com/flowtype/ide-flowtype&quot;&gt;ide-flowtype&lt;/a&gt; to bring the power of the Flow type annotation system to Atom.&lt;/p&gt;

&lt;h3 id=&quot;c-ide-csharp&quot;&gt;C# (ide-csharp)&lt;/h3&gt;

&lt;p&gt;One of the earliest examples of a language server was OmniSharp for the C# language.  By taking advantage of the node-omnisharp package we are able to bring many IDE-like features into Atom for C# via &lt;a href=&quot;https://github.com/atom/ide-csharp/&quot;&gt;ide-csharp&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;java-ide-java&quot;&gt;Java (ide-java)&lt;/h3&gt;

&lt;p&gt;The Eclipse foundation and Red Hat have been a big proponent of language servers and the Java package shows!  You will need a Java 8 runtime installed to get going but then can enjoy much richer editor facilities. Check out &lt;a href=&quot;https://github.com/atom/ide-java/&quot;&gt;ide-java&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;php-ide-php&quot;&gt;PHP (ide-php)&lt;/h3&gt;

&lt;p&gt;The &lt;a href=&quot;https://github.com/atom/ide-php/&quot;&gt;ide-php&lt;/a&gt; utilizes a &lt;a href=&quot;https://github.com/felixfbecker/php-language-server&quot;&gt;PHP language server by FelixFBecker&lt;/a&gt; to provide support for the PHP scripting language. (Requires the PHP 7 runtime installed.)&lt;/p&gt;

&lt;h1 id=&quot;using-atom-ide&quot;&gt;Using Atom-IDE&lt;/h1&gt;

&lt;p&gt;Each of the IDE packages expose a selection of functionality that is dependent on the underlying language server and is activated when you open files it supports. (Some take a few seconds to start-up and others like ide-java and ide-php will take a short while on first open to download the language server itself.)&lt;/p&gt;

&lt;p&gt;Here’s a quick summary of how these features are exposed within Atom IDE:&lt;/p&gt;

&lt;h3 id=&quot;autocomplete&quot;&gt;Autocomplete&lt;/h3&gt;
&lt;p&gt;Autocomplete is enabled in all the ide packages we are shipping today. Start typing to get improved results. Some providers may require you to manually trigger autocompletion by pressing &lt;kbd&gt;Ctrl&lt;/kbd&gt;&lt;kbd&gt;Space&lt;/kbd&gt; for performance reasons.&lt;/p&gt;

&lt;h3 id=&quot;diagnostics&quot;&gt;Diagnostics&lt;/h3&gt;
&lt;p&gt;You can see diagnostics by clicking the red exclamation mark and yellow warning triangle at the bottom left of your Atom window. This will open the new Diagnostics pane that shows you the errors and warnings and allow you to click them to jump right to that location in the code. You will also see indicators to the left of line numbers in the editor itself.&lt;/p&gt;

&lt;h3 id=&quot;find-all-references&quot;&gt;Find all references&lt;/h3&gt;
&lt;p&gt;Position the text cursor in the class or variable you are interested in then activate &lt;strong&gt;Find all references&lt;/strong&gt; either from the right-mouse button menu or &lt;strong&gt;Find References: Activate&lt;/strong&gt; from the command palette.&lt;/p&gt;

&lt;p&gt;Some providers allow you to reformat the document. Simply select &lt;strong&gt;Code Format: Format Code&lt;/strong&gt; from the command palette.&lt;/p&gt;
&lt;h3 id=&quot;formatting&quot;&gt;Formatting&lt;/h3&gt;

&lt;h3 id=&quot;go-to-definition&quot;&gt;Go to definition&lt;/h3&gt;
&lt;p&gt;&lt;kbd&gt;Ctrl&lt;/kbd&gt; click on a class or variable reference to be taken directly to where it is defined within your project.&lt;/p&gt;

&lt;h3 id=&quot;hover&quot;&gt;Hover&lt;/h3&gt;
&lt;p&gt;Hover the mouse pointer over a type or other supported object and you can see some additional information relating to it.&lt;/p&gt;

&lt;h3 id=&quot;outline-view&quot;&gt;Outline view&lt;/h3&gt;
&lt;p&gt;Many providers let you see a tree-based outline view of the current document which you can search and then click to go right to that area of code. You can toggle the new Outline View from the View menu or the &lt;strong&gt;Outline View: Toggle&lt;/strong&gt; command.&lt;/p&gt;

&lt;h3 id=&quot;reference-highlighting&quot;&gt;Reference highlighting&lt;/h3&gt;
&lt;p&gt;Some providers let you see immediate references to the variable or object you are working on. Positioning your text cursor within that variable can highlight other references instantly.&lt;/p&gt;

&lt;h1 id=&quot;future-plans&quot;&gt;Future plans&lt;/h1&gt;

&lt;p&gt;This is just the start of our journey. With the help of our community, we plan to expand the number of languages that Atom-IDE can support and make it possible for you to run and edit applications, making Atom-IDE a true IDE.&lt;/p&gt;

&lt;p&gt;We hope to see future language support for the great languages out there including Rust, Go, Python, etc.&lt;/p&gt;

&lt;p&gt;If a language server exists for your favorite language it is incredibly easy to create your own Atom-IDE package that takes advantage of it by using our &lt;a href=&quot;https://github.com/atom/atom-languageclient&quot;&gt;atom-languageclient npm library&lt;/a&gt; that provides common automatic wire-up of the major features as well as helper tools such as downloading support files and conversions.&lt;/p&gt;</content><author><name>damieng</name></author><summary type="html">GitHub, in collaboration with Facebook, are pleased to announce the launch of Atom-IDE - a set of optional packages to bring IDE-like functionality to Atom.</summary></entry><entry><title type="html">Atom 1.19</title><link href="http://blog.atom.io/2017/08/08/atom-1-19.html" rel="alternate" type="text/html" title="Atom 1.19" /><published>2017-08-08T00:00:00+00:00</published><updated>2017-08-08T00:00:00+00:00</updated><id>http://blog.atom.io/2017/08/08/atom-1-19</id><content type="html" xml:base="http://blog.atom.io/2017/08/08/atom-1-19.html">&lt;p&gt;&lt;img src=&quot;/img/posts/release-1-19.png&quot; alt=&quot;Atom 1.19&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Today’s Atom 1.19 release offers improved performance and responsiveness via major architectural updates and an upgrade to Electron 1.6.9.&lt;/p&gt;

&lt;!--more--&gt;

&lt;h3 id=&quot;improved-responsiveness-and-memory-usage&quot;&gt;Improved Responsiveness and Memory Usage&lt;/h3&gt;

&lt;p&gt;Atom 1.19 introduces a &lt;a href=&quot;https://github.com/atom/superstring&quot;&gt;native C++ text buffer implementation&lt;/a&gt; that improves responsiveness and memory usage. Saving a file now happens asynchronously without blocking the UI, so that you can move smoothly from one task to the next. Large files now consume less memory, marking another step in our continued drive to provide an excellent experience for all files big and small.&lt;/p&gt;

&lt;h3 id=&quot;editor-rendering-layer-rewrite&quot;&gt;Editor Rendering Layer Rewrite&lt;/h3&gt;

&lt;p&gt;This release includes a &lt;a href=&quot;https://github.com/atom/atom/pull/13880&quot;&gt;full rewrite&lt;/a&gt; of the text editor’s rendering layer. We revisited all of our DOM layout and script interactions with the goal of improving performance, reducing complexity, and taking advantage of new APIs such as &lt;a href=&quot;https://developers.google.com/web/updates/2016/04/intersectionobserver&quot;&gt;intersection observers&lt;/a&gt;, &lt;a href=&quot;https://developers.google.com/web/updates/2016/10/resizeobserver&quot;&gt;resize observers&lt;/a&gt;, and &lt;a href=&quot;https://developers.google.com/web/updates/2016/06/css-containment&quot;&gt;CSS containment boundaries&lt;/a&gt;. We did an &lt;a href=&quot;http://blog.atom.io/2017/06/22/a-new-approach-to-text-rendering.html&quot;&gt;in-depth post&lt;/a&gt; about it last month.&lt;/p&gt;

&lt;h3 id=&quot;other-notable-changes-and-fixes&quot;&gt;Other Notable Changes and Fixes&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/pull/14694&quot;&gt;Render line number gutter without numbers when showLineNumbers is false&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/pull/14753&quot;&gt;Improve clarity of Editor not responding actions&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/tree-view/pull/1127&quot;&gt;Restore ability for &lt;code class=&quot;highlighter-rouge&quot;&gt;escape&lt;/code&gt; to return focus to center&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/whitespace/pull/157&quot;&gt;Optimize trailing whitespace removal using native buffer search&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don’t forget to check out all the other improvements shipping with this version in the &lt;a href=&quot;https://github.com/atom/atom/releases/tag/v1.19.0&quot;&gt;release notes&lt;/a&gt;! :memo:&lt;/p&gt;

&lt;h2 id=&quot;atom-120-beta&quot;&gt;Atom 1.20 Beta&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/img/release-beta.png&quot; alt=&quot;Atom Beta&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Atom 1.20, released on the beta channel today, features numerous improvements in the &lt;code class=&quot;highlighter-rouge&quot;&gt;github&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;find-and-replace&lt;/code&gt;, and &lt;code class=&quot;highlighter-rouge&quot;&gt;language-php&lt;/code&gt; packages.&lt;/p&gt;

&lt;h3 id=&quot;git-integration-improvements&quot;&gt;Git Integration Improvements&lt;/h3&gt;

&lt;p&gt;The way diff views get opened &lt;a href=&quot;https://github.com/atom/github/pull/1016&quot;&gt;was reworked&lt;/a&gt; resulting in pending pane support and multiple simultaneous diff views:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/posts/multiple-diff-views.gif&quot; alt=&quot;Multiple Diff Views&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We’ve also enabled composing commit messages in the main editor for those not into the whole brevity thing.&lt;/p&gt;

&lt;h3 id=&quot;find-and-replace&quot;&gt;Find and Replace&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/atom/find-and-replace/pull/908&quot;&gt;Context lines&lt;/a&gt; are now optionally displayed with Find in Project results. You can set the number of available lines before and after matches in the package settings and modify their display inline when looking at the results.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/posts/find-and-replace-context.png&quot; alt=&quot;Find and Replace Context&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;other-enhancements&quot;&gt;Other Enhancements&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/language-php/pulls?utf8=%E2%9C%93&amp;amp;q=is%3Apr%20is%3Aclosed%20merged%3A2017-06-08..2017-08-03&quot;&gt;Dozens of fixes&lt;/a&gt; for PHP grammar support were made in the &lt;code class=&quot;highlighter-rouge&quot;&gt;language-php&lt;/code&gt; package.&lt;/li&gt;
  &lt;li&gt;Support has been added to bracket-matcher for &lt;a href=&quot;https://github.com/atom/bracket-matcher/pull/294&quot;&gt;code embedded in strings&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;We’ve added an &lt;a href=&quot;https://github.com/atom/atom/pull/14736&quot;&gt;API for observing dock visibility&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are many more details in the &lt;a href=&quot;https://github.com/atom/atom/releases/tag/v1.20.0-beta0&quot;&gt;release notes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Get all these improvements today by joining the &lt;a href=&quot;https://atom.io/beta&quot;&gt;Atom Beta Channel&lt;/a&gt;!&lt;/p&gt;</content><author><name>iolsen</name></author><summary type="html">Today’s Atom 1.19 release offers improved performance and responsiveness via major architectural updates and an upgrade to Electron 1.6.9.</summary></entry><entry><title type="html">A new approach to text rendering</title><link href="http://blog.atom.io/2017/06/22/a-new-approach-to-text-rendering.html" rel="alternate" type="text/html" title="A new approach to text rendering" /><published>2017-06-22T00:00:00+00:00</published><updated>2017-06-22T00:00:00+00:00</updated><id>http://blog.atom.io/2017/06/22/a-new-approach-to-text-rendering</id><content type="html" xml:base="http://blog.atom.io/2017/06/22/a-new-approach-to-text-rendering.html">&lt;p&gt;In Atom 1.19, we’re landing &lt;a href=&quot;https://github.com/atom/atom/pull/13880&quot;&gt;a complete rewrite of the text editor’s DOM interaction layer&lt;/a&gt; that improves rendering performance and simplifies the code. Prompted by the availability of some valuable new DOM APIs with the upgrade to Electron 1.6, we decided to start over from the beginning and take a critical look at the structure and performance of every aspect of our DOM interaction. You should observe the biggest difference when scrolling. Here is a typical frame after scrolling by 15 lines before and after the rewrite:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before: Scrolling 15 lines in Atom 1.18 (~30ms):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/posts/scrolling-in-1-18.png&quot; alt=&quot;Timeline: Scrolling half a screen in Atom 1.18&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;After: Scrolling 15 lines in Atom 1.19 (~16ms):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/posts/scrolling-in-1-19.png&quot; alt=&quot;Timeline: Scrolling half a screen in Atom 1.19&quot; /&gt;&lt;/p&gt;

&lt;p&gt;About a 50% improvement, give or take some noise on any given frame.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;You should also experience more responsive typing. Here’s a before-and-after for a typical frame following a character insertion:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before: Rendering a character insertion in Atom 1.18 (~8ms):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/posts/insertion-in-1-18.png&quot; alt=&quot;Timeline: Rendering a character insertion in Atom 1.18&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;After: Rendering a character insertion in Atom 1.19 (~5.7ms):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/posts/insertion-in-1-19.png&quot; alt=&quot;Timeline: Rendering a character insertion in Atom 1.19&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In this case the speedup is around 30%. We’re seeing similar improvements for other common updates such as cursor and selection movements.&lt;/p&gt;

&lt;p&gt;In the rest of this post, we’ll share some highlights from this rewrite to give you a sense of how things have changed.&lt;/p&gt;

&lt;h2 id=&quot;back-to-a-virtual-dom&quot;&gt;Back to a virtual DOM&lt;/h2&gt;

&lt;p&gt;Building a text editor on top of the DOM requires a disciplined interaction with the document. To minimize overhead for style recalculation and layout, we only render the lines that are actually visible on screen in a given frame. In addition, we use absolutely-positioned elements to render cursors, selections, and overlays like the autocomplete menu. This requires us to measure horizontal character positions directly from rendered content in order to support mixed font weights, variable-width characters, and ligatures, which means we need to break each frame into a pre- and post-measurement update. We also recycle the nodes making up the lines and line numbers to minimize pressure on the garbage collector. For all these reasons and more, we deliberately stuck to a rather low level of abstraction for the previous editor implementation.&lt;/p&gt;

&lt;p&gt;Since that time, however, we have developed a small, focused library for DOM manipulation called &lt;a href=&quot;https://github.com/atom/etch&quot;&gt;Etch&lt;/a&gt; that was largely inspired by our experience with Atom’s text editor. We’ve been using it in many of Atom’s bundled packages for a while now, but this is the first time we have used it in core. The main idea behind Etch is to offer a React-like abstraction based on tree diffing for updating the DOM, but with a strong focus on encapsulation and clean interoperation with other libraries in a multi-tenant document. Mixing manual DOM manipulation with declarative code feels very natural in Etch, and while JSX is supported, Etch is also designed to be used without a transpiler.&lt;/p&gt;

&lt;p&gt;Using Etch, we &lt;a href=&quot;https://github.com/atom/atom/blob/4b2a26e74f8290f7206e6ca5706fb2a51bc04200/src/text-editor-component.js#L402&quot;&gt;switched&lt;/a&gt; the majority of our manual DOM manipulation code over to a virtual DOM and removed a ton of boilerplate in the process. We continue to construct lines and line numbers &lt;a href=&quot;https://github.com/atom/atom/blob/4b2a26e74f8290f7206e6ca5706fb2a51bc04200/src/text-editor-component.js#L3442&quot;&gt;manually&lt;/a&gt; with imperative DOM APIs to obtain the best possible performance for our most intensive update paths and to &lt;a href=&quot;https://github.com/atom/atom/blob/4b2a26e74f8290f7206e6ca5706fb2a51bc04200/src/text-editor-component.js#L3122&quot;&gt;recycle DOM nodes&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;intersection-and-resize-observers&quot;&gt;Intersection and resize observers&lt;/h2&gt;

&lt;p&gt;As we mentioned earlier, we only render the visible lines in any given frame. This means we need to measure the dimensions of the editor and the height of our lines, and we need to respond when these dimensions change due to font size changes or changes to the document’s structure. If we decide to re-measure and the editor isn’t currently visible, we need to wait until it becomes visible again before performing our measurements.&lt;/p&gt;

&lt;p&gt;Prior to Electron 1.6, however, there weren’t a lot of tools for detecting these kinds of changes to the document. A simple solution would have been to expose methods on the editor that could be manually called to update dimensions, but that would have been annoying and error-prone for package authors that want to use editors outside of Atom’s panes. So unfortunately, the best solution we could come up with prior to Atom 1.19 was a global &lt;a href=&quot;https://hacks.mozilla.org/2012/05/dom-mutationobserver-reacting-to-dom-changes-without-killing-browser-performance/&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;MutationObserver&lt;/code&gt;&lt;/a&gt; that scheduled lightweight measurements whenever the document changed. While that approach worked and we were never able to measure a serious performance consequence, globally associating &lt;em&gt;any&lt;/em&gt; amount of work with DOM manipulation made us uneasy, and we were anxious for better APIs that could enable a more targeted solution.&lt;/p&gt;

&lt;p&gt;With improvements to the &lt;a href=&quot;https://developers.google.com/web/updates/2016/04/intersectionobserver&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;IntersectionObserver&lt;/code&gt;&lt;/a&gt; API and the introduction of the  &lt;a href=&quot;https://developers.google.com/web/updates/2016/10/resizeobserver&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;ResizeObserver&lt;/code&gt;&lt;/a&gt; API behind a flag in Chrome 56, however, we finally have a sane approach to detecting changes to editor dimensions and visibility in a fine-grained way. We now use intersection observers to &lt;a href=&quot;https://github.com/atom/atom/blob/4b2a26e74f8290f7206e6ca5706fb2a51bc04200/src/text-editor-component.js#L1344&quot;&gt;detect when editors are hidden and shown&lt;/a&gt; and resize observers to &lt;a href=&quot;https://github.com/atom/atom/blob/4b2a26e74f8290f7206e6ca5706fb2a51bc04200/src/text-editor-component.js#L1354&quot;&gt;detect when editors change size&lt;/a&gt;. We’ve deleted the global mutation observer and any potential performance tax it was imposing on DOM manipulation.&lt;/p&gt;

&lt;h2 id=&quot;css-containment&quot;&gt;CSS containment&lt;/h2&gt;

&lt;p&gt;Another valuable feature that’s become available since we last worked on editor rendering is &lt;a href=&quot;https://developers.google.com/web/updates/2016/06/css-containment&quot;&gt;CSS containment declarations&lt;/a&gt;, which allows us to tell the browser that the contents of a particular element don’t affect the layout and painting of external elements. This leads to the browser performing work on smaller subtrees of the document when elements are updated.&lt;/p&gt;

&lt;p&gt;In our rewrite, we used &lt;code class=&quot;highlighter-rouge&quot;&gt;contain: strict&lt;/code&gt; on as many elements as possible, basically whenever we were able to assign an explicit height and width on an element. For example, we break the lines and line numbers into explicitly-sized tiles that contain six lines each, then &lt;a href=&quot;https://github.com/atom/atom/blob/4b2a26e74f8290f7206e6ca5706fb2a51bc04200/src/text-editor-component.js#L617&quot;&gt;apply strict containment to the tiles&lt;/a&gt;. This means that for a given edit, only a subset of the lines in the editor will be invalidated.&lt;/p&gt;

&lt;h2 id=&quot;new-decoration-apis&quot;&gt;New decoration APIs&lt;/h2&gt;

&lt;p&gt;Soon after getting the rewritten editor into a usable state, we learned that our changes ran afoul of some monkey-patching being performed in the &lt;a href=&quot;https://atom.io/packages/vim-mode-plus&quot;&gt;vim-mode-plus&lt;/a&gt; and &lt;a href=&quot;https://atom.io/packages/pigments&quot;&gt;pigments&lt;/a&gt; packages. Rather than having them port their monkey-patches to the new rendering system, we decided to add support for what they were trying to achieve via official decoration APIs.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/posts/text-decorations-in-1-19.gif&quot; alt=&quot;Text decorations in action&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To support the pigments package, which changes the foreground and background color of CSS color expressions, we added &lt;a href=&quot;https://github.com/atom/atom/pull/14790/files#diff-561e90889eebfd1149f1b29006d738c4R1790&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;text&lt;/code&gt; decorations&lt;/a&gt;. These are similar to highlight decorations, in that you associate a class or inline style with a marker’s range, but text decorations are rendered by injecting spans around runs of text that intersect the marked range. This makes it easy to apply arbitrary styling such as changing the foreground and background colors or font weight. However, font size won’t work for now because we don’t yet support variable line heights in the editor.&lt;/p&gt;

&lt;p&gt;For vim-mode-plus, we added &lt;code class=&quot;highlighter-rouge&quot;&gt;cursor&lt;/code&gt; decorations, which allow you to apply classes or inline styles to Atom’s cursors by decorating a cursor’s associated marker. You can also create and style your own synthetic cursors by passing a non-selection marker, which might be useful for packages that implement pair programming.&lt;/p&gt;

&lt;h2 id=&quot;next-steps&quot;&gt;Next steps&lt;/h2&gt;

&lt;p&gt;Rendering has improved a lot and things should feel smoother, but there’s still room for improvement. Let’s take another look at a typical frame when scrolling downward by half a screen (around 15 lines).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/posts/scrolling-in-1-19-breakdown.png&quot; alt=&quot;Timeline breakdown: Scrolling in Atom 1.19&quot; /&gt;&lt;/p&gt;

&lt;p&gt;One frustrating component of the above breakdown is the time spent recalculating styles. At this point, it looks like the only way to solve this within the current paradigm is to use CSS less and reduce the number of selectors in the application, but that’s going to be a hard fought battle given the huge number of themes in the ecosystem. Another option is to skip CSS entirely for the purposes of applying syntax highlights and use a proprietary system to render inline styles, but that would raise the barrier to entry for theme developers and break Atom’s huge ecosystem of existing themes. Instead, it’s looking like our best option might be to continue to support CSS selectors for theming, but to implement our own custom code path for matching them against nodes in our syntax tree. This would allow us to render fewer overall nodes and reuse work across nodes with a common syntactic ancestry.&lt;/p&gt;

&lt;p&gt;But if we’re going so far as to bypass Chrome’s CSS engine, maybe we should try to bypass the DOM entirely. If you look at the above flame graph, a huge percentage of our frame time is going to DOM manipulation (highlighted in yellow) and DOM-related overhead (highlighted in purple). If we could eliminate this work, rendering a frame would only involve executing some domain-specific update logic and painting, which could be fraction of the current time. Next time we cycle back to this area of the code base, we’d like to explore using the &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API&quot;&gt;canvas API&lt;/a&gt; to render the most intensive parts of the editor such as the lines and line numbers. Now that our text storage has been ported to C++ (&lt;a href=&quot;(https://github.com/atom/superstring/pull/5)&quot;&gt;which also landed in 1.19&lt;/a&gt;), we could even move the rendering code to C++ (along with the &lt;a href=&quot;https://github.com/atom/text-buffer/blob/1dfb7b4061de55a5bfa2445451dbb9197297718e/src/display-layer.js&quot;&gt;DisplayLayer&lt;/a&gt;’s spatial index) to minimize overhead even further.&lt;/p&gt;

&lt;p&gt;For now, however, we need to move on to improving other areas of the system. If anyone reading this is interested in contributing and would like to give canvas a shot, please reach out to us on Slack or open an issue and we’d be keen to facilitate if you’re serious.&lt;/p&gt;</content><author><name>nathansobo</name></author><summary type="html">In Atom 1.19, we’re landing a complete rewrite of the text editor’s DOM interaction layer that improves rendering performance and simplifies the code. Prompted by the availability of some valuable new DOM APIs with the upgrade to Electron 1.6, we decided to start over from the beginning and take a critical look at the structure and performance of every aspect of our DOM interaction. You should observe the biggest difference when scrolling. Here is a typical frame after scrolling by 15 lines before and after the rewrite: Before: Scrolling 15 lines in Atom 1.18 (~30ms): After: Scrolling 15 lines in Atom 1.19 (~16ms): About a 50% improvement, give or take some noise on any given frame.</summary></entry><entry><title type="html">Atom 1.18</title><link href="http://blog.atom.io/2017/06/13/atom-1-18.html" rel="alternate" type="text/html" title="Atom 1.18" /><published>2017-06-13T00:00:00+00:00</published><updated>2017-06-13T00:00:00+00:00</updated><id>http://blog.atom.io/2017/06/13/atom-1-18</id><content type="html" xml:base="http://blog.atom.io/2017/06/13/atom-1-18.html">&lt;p&gt;&lt;img src=&quot;/img/posts/release-1-18.png&quot; alt=&quot;Atom 1.18&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Today’s &lt;a href=&quot;https://atom.io&quot;&gt;Atom 1.18&lt;/a&gt; release introduces Git and GitHub integration right inside your editor!&lt;/p&gt;

&lt;!--more--&gt;

&lt;h3 id=&quot;git-and-github-integration&quot;&gt;Git and GitHub Integration&lt;/h3&gt;

&lt;p&gt;We’re thrilled to be shipping rich integration with Git and GitHub in Atom 1.18! This is merely the first release but we’re excited about what it already brings to the editor. Check out posts &lt;a href=&quot;http://blog.atom.io/2017/05/16/git-and-github-integration-comes-to-atom.html&quot;&gt;here&lt;/a&gt; and on the &lt;a href=&quot;https://githubengineering.com/integrating-git-in-atom/&quot;&gt;GitHub engineering blog&lt;/a&gt; for more details. Or get a peek at some of the features on &lt;a href=&quot;https://github.atom.io/&quot;&gt;github.atom.io&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/posts/github-package-git.png&quot;&gt;&lt;img src=&quot;/img/posts/github-package-git.png&quot; alt=&quot;Git for Atom&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;more-improvements&quot;&gt;More Improvements&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/first-mate/issues/93&quot;&gt;Improved tokenizing performance via oniguruma caching&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/pull/14287&quot;&gt;Correctly launch Atom from Windows Subsystem for Linux&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/pull/13947&quot;&gt;Added an option to always restore previous session&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/find-and-replace/pull/847&quot;&gt;Added settings for showing context in find-and-replace&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/autocomplete-html/pulls?utf8=%E2%9C%93&amp;amp;q=is%3Apr%20is%3Aclosed%20author%3A50wliu%20updated%3A%3C2017-05-04&quot;&gt;Improved suggestions in autocomplete-html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don’t forget to check out all the other improvements shipping with this version in the &lt;a href=&quot;https://github.com/atom/atom/releases/tag/v1.18.0&quot;&gt;release notes&lt;/a&gt;! :memo:&lt;/p&gt;

&lt;h2 id=&quot;atom-119-beta&quot;&gt;Atom 1.19 Beta&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/img/release-beta.png&quot; alt=&quot;Atom Beta&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Atom 1.19 includes two major architectural updates and an update to Electron 1.6.9.&lt;/p&gt;

&lt;h3 id=&quot;native-text-buffer&quot;&gt;Native Text Buffer&lt;/h3&gt;

&lt;p&gt;Atom 1.19 introduces an implementation of &lt;a href=&quot;https://github.com/atom/superstring&quot;&gt;Atom’s underlying text buffer in native C++&lt;/a&gt;. File saves are now asynchronous and will never block the UI. Memory usage for large files has been reduced.&lt;/p&gt;

&lt;h3 id=&quot;editor-rendering-layer-rewrite&quot;&gt;Editor Rendering Layer Rewrite&lt;/h3&gt;

&lt;p&gt;This release includes a &lt;a href=&quot;https://github.com/atom/atom/pull/13880&quot;&gt;full rewrite&lt;/a&gt; of the text editor’s rendering layer. We revisited all of our DOM layout and script interactions with the goal of improving performance, reducing complexity, and taking advantage of new APIs such as &lt;a href=&quot;https://developers.google.com/web/updates/2016/04/intersectionobserver&quot;&gt;intersection observers&lt;/a&gt;, &lt;a href=&quot;https://developers.google.com/web/updates/2016/10/resizeobserver&quot;&gt;resize observers&lt;/a&gt;, and &lt;a href=&quot;https://developers.google.com/web/updates/2016/06/css-containment&quot;&gt;CSS containment boundaries&lt;/a&gt;. Look for an in-depth post next week for more details.&lt;/p&gt;

&lt;h3 id=&quot;other-notable-changes-and-fixes&quot;&gt;Other Notable Changes and Fixes&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/pull/14694&quot;&gt;Render line number gutter without numbers when showLineNumbers is false&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/pull/14753&quot;&gt;Improved clarity of Editor not responding actions&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/tree-view/pull/1127&quot;&gt;Restore ability for &lt;code class=&quot;highlighter-rouge&quot;&gt;escape&lt;/code&gt; to return focus to center&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/whitespace/pull/157&quot;&gt;Optimize trailing whitespace removal using native buffer search&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are many more details in the &lt;a href=&quot;https://github.com/atom/atom/releases/tag/v1.19.0-beta0&quot;&gt;release notes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Get all these improvements today by joining the &lt;a href=&quot;https://atom.io/beta&quot;&gt;Atom Beta Channel&lt;/a&gt;!&lt;/p&gt;</content><author><name>iolsen</name></author><summary type="html">Today’s Atom 1.18 release introduces Git and GitHub integration right inside your editor!</summary></entry><entry><title type="html">Docks Deep Dive</title><link href="http://blog.atom.io/2017/05/23/docks-deep-dive.html" rel="alternate" type="text/html" title="Docks Deep Dive" /><published>2017-05-23T00:00:00+00:00</published><updated>2017-05-23T00:00:00+00:00</updated><id>http://blog.atom.io/2017/05/23/docks-deep-dive</id><content type="html" xml:base="http://blog.atom.io/2017/05/23/docks-deep-dive.html">&lt;p&gt;&lt;img src=&quot;/img/posts/docks.png&quot; alt=&quot;Docks graphic&quot; /&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;This is a guest post written by Facebook’s &lt;a href=&quot;https://nuclide.io/&quot;&gt;Nuclide&lt;/a&gt; team member &lt;a href=&quot;https://github.com/matthewwithanm&quot;&gt;@matthewwithanm&lt;/a&gt;. He tells the story how the new docks got introduced to Atom and how package authors can make great use of them.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;One of the things that the Nuclide team has always really loved about Atom is how it lets us extend and experiment with UI. Tools like Outline View, Console, Diagnostics, and the Debugger all need custom UI and, up until recently, their natural home was Atom’s Panels. Located at the edges of the window, panels are a great place for these kind of graphical tools but they have a couple of issues.&lt;/p&gt;

&lt;!--more--&gt;

&lt;ol&gt;
  &lt;li&gt;They stack, and can easily end up consuming a lot of valuable screen real estate.&lt;/li&gt;
  &lt;li&gt;Though most panels need to be closable, they each have their own UI for it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In addition to these UX issues, they also require extra work from developers. For example, the Atom tree view had special logic that allowed users to show it on either the left or right side of their screen. Anybody wanting similar functionality for their package had to duplicate this logic.&lt;/p&gt;

&lt;p&gt;To get around these limitations, Nuclide introduced collapsible pane containers—now called “docks”—at the edges of the window. Each dock can hold multiple items, which users can reposition in order to get their layout of choice. Thanks to help from the Atom team, we’ve contributed this functionality upstream for Atom 1.17. We’re super excited for the community to start taking advantage of them but, before you do, we figured we should tell you how they work 😊&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/posts/docks-demo.gif&quot; alt=&quot;Docks Demo&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;opening-items-in-docks&quot;&gt;Opening Items in Docks&lt;/h1&gt;

&lt;p&gt;At their core, docks are just new places that workspace items can go in. What’s a workspace item? The most common example is a text editor, but there are plenty of others: the settings view, search results, and welcome guide are all workspace items. Knowing that, it probably won’t be too surprising that we haven’t added much new API to Atom—instead, we’ve built on the APIs that already existed for managing these items. The most basic of these is &lt;code class=&quot;highlighter-rouge&quot;&gt;atom.workspace.open()&lt;/code&gt;. Traditionally, this method has accepted a URL which Atom then associates with a view. This functionality maintains intact, but you can also open an item directly now:&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kr&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;element&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'div'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;getTitle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'My Awesome Item'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;getURI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'atom://my-package/my-item'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;getDefaultLocation&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'right'&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;atom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;workspace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;You’ve probably noticed the item’s &lt;code class=&quot;highlighter-rouge&quot;&gt;getDefaultLocation()&lt;/code&gt; method. This is a new (optional) method that returns one of &lt;code class=&quot;highlighter-rouge&quot;&gt;'right'&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;'left'&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;'bottom'&lt;/code&gt;, or &lt;code class=&quot;highlighter-rouge&quot;&gt;'center'&lt;/code&gt; depending on where you—the package author—want your view to appear initially. The difference between this and something like &lt;code class=&quot;highlighter-rouge&quot;&gt;atom.workspace.addRightPanel()&lt;/code&gt; is that it’s only a suggestion; if a user moves the item to a new location, their preference will be remembered and used the next time an item with the same URI is opened. Of course, sometimes you may want to limit the locations that users can move your item to. For that, you can add a &lt;code class=&quot;highlighter-rouge&quot;&gt;getAllowedLocations()&lt;/code&gt; method to your item:&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  &lt;span class=&quot;nx&quot;&gt;getAllowedLocations&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'left'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'right'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Other newly supported item methods include &lt;code class=&quot;highlighter-rouge&quot;&gt;getPreferredWidth()&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;getPreferredHeight()&lt;/code&gt;, which determine the initial size of the dock.&lt;/p&gt;

&lt;h1 id=&quot;toggling-items&quot;&gt;Toggling Items&lt;/h1&gt;

&lt;p&gt;When you have multiple items sharing a single dock, toggling an item isn’t as straightforward as just  &lt;code class=&quot;highlighter-rouge&quot;&gt;open()&lt;/code&gt;ing and &lt;code class=&quot;highlighter-rouge&quot;&gt;destroy()&lt;/code&gt;ing it. If your item isn’t visible, it should be made visible, but if it is, the entire dock should be hidden. It can be tough to get this logic right (not to mention a pain to have to implement it every time), so we added a new API for doing it: &lt;code class=&quot;highlighter-rouge&quot;&gt;atom.workspace.toggle()&lt;/code&gt;. Just pass it an item or URI and it’ll do the rest. In Nuclide, we use this to create “toggle” commands:&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nx&quot;&gt;atom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;commands&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
  &lt;span class=&quot;s1&quot;&gt;'atom-workspace'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;s1&quot;&gt;'my-package:toggle'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;atom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;workspace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;toggle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;If the item is visible and in a dock, the dock will be collapsed; if it’s in the workspace center, the item will be destroyed. Like &lt;code class=&quot;highlighter-rouge&quot;&gt;open()&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;toggle()&lt;/code&gt; accepts URIs as well as items. This is useful for when you can have multiple copies of your item in the workspace—for example, if you want to allow users to split your item and create a duplicate. Instead of having to keep track of the items yourself, just make sure their &lt;code class=&quot;highlighter-rouge&quot;&gt;getURI()&lt;/code&gt; methods return the same URI. Passing that URI to &lt;code class=&quot;highlighter-rouge&quot;&gt;toggle()&lt;/code&gt; will Do The Right Thing.&lt;/p&gt;

&lt;h1 id=&quot;digging-deeper&quot;&gt;Digging Deeper&lt;/h1&gt;

&lt;p&gt;So far we’ve just looked at the API for dealing with items. In general, they work like this: items declare things about how they want to be displayed and Atom (taking into account user preferences), displays them. This relationship is really important because it gives users more control over their workspace and Atom the ability to make innovations without requiring any updates from you.&lt;/p&gt;

&lt;p&gt;However, for those occasions where you just can’t handle giving up control, there are imperative APIs for interacting directly with docks: &lt;code class=&quot;highlighter-rouge&quot;&gt;atom.workspace.getLeftDock()&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;atom.workspace.getRightDock()&lt;/code&gt;, and (you guessed it) &lt;code class=&quot;highlighter-rouge&quot;&gt;atom.workspace.getBottomDock()&lt;/code&gt;. The returned object allows direct control over the dock with methods like &lt;code class=&quot;highlighter-rouge&quot;&gt;show()&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;hide()&lt;/code&gt;, and &lt;code class=&quot;highlighter-rouge&quot;&gt;toggle()&lt;/code&gt;, as well as manipulation of its panes and pane items via methods like &lt;code class=&quot;highlighter-rouge&quot;&gt;observePanes()&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;getActivePaneItem()&lt;/code&gt;. A similar object, which represents the center of the workspace and normally houses your text editors, is returned by &lt;code class=&quot;highlighter-rouge&quot;&gt;atom.workspace.getCenter()&lt;/code&gt;.&lt;/p&gt;

&lt;h1 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h1&gt;

&lt;p&gt;Docks have been an important addition to Nuclide. Not only have they made the experience more consistent, but they’ve also given developers here at Facebook more control over their editor’s real estate. We’re really excited to have been able to collaborate with the Atom team to bring this feature to everybody…and even more excited to see what you build with it! Why not get started now by checking out the &lt;a href=&quot;http://flight-manual.atom.io/hacking-atom/sections/package-active-editor-info/&quot;&gt;Active Editor Info tutorial&lt;/a&gt;?&lt;/p&gt;</content><author><name>matthewwithanm</name></author><summary type="html">This is a guest post written by Facebook’s Nuclide team member @matthewwithanm. He tells the story how the new docks got introduced to Atom and how package authors can make great use of them. One of the things that the Nuclide team has always really loved about Atom is how it lets us extend and experiment with UI. Tools like Outline View, Console, Diagnostics, and the Debugger all need custom UI and, up until recently, their natural home was Atom’s Panels. Located at the edges of the window, panels are a great place for these kind of graphical tools but they have a couple of issues.</summary></entry><entry><title type="html">Git and GitHub Integration comes to Atom</title><link href="http://blog.atom.io/2017/05/16/git-and-github-integration-comes-to-atom.html" rel="alternate" type="text/html" title="Git and GitHub Integration comes to Atom" /><published>2017-05-16T00:00:00+00:00</published><updated>2017-05-16T00:00:00+00:00</updated><id>http://blog.atom.io/2017/05/16/git-and-github-integration-comes-to-atom</id><content type="html" xml:base="http://blog.atom.io/2017/05/16/git-and-github-integration-comes-to-atom.html">&lt;p&gt;&lt;a href=&quot;https://github.atom.io/&quot;&gt;&lt;img src=&quot;/img/posts/github-for-atom.png&quot; alt=&quot;Introducing the GitHub Package&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A text editor is at the core of the developer’s toolbox, but many other useful pieces of software coexist along with it, such as Git and GitHub. Starting today, Atom adds Git and GitHub integration directly in Atom via the GitHub package. This is a new core package included with Atom and is available right now in today’s &lt;a href=&quot;https://atom.io/beta&quot;&gt;1.18 beta release&lt;/a&gt;. Be sure to check out &lt;a href=&quot;https://github.atom.io/&quot;&gt;github.atom.io&lt;/a&gt; for more information!&lt;/p&gt;

&lt;!--more--&gt;

&lt;h3 id=&quot;git-goes-atomic&quot;&gt;Git goes Atomic&lt;/h3&gt;

&lt;p&gt;Git is an essential part of many developers’ workflows, but dropping to the command line or another GUI application in the middle of writing code can take you out of the flow. The GitHub package provides a dock item and status bar widgets to give you access to some of the most common Git operations without leaving your editor. Stage changes and create commits, create and switch branches, and even resolve merge conflicts directly in Atom’s UI.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/posts/github-package-git.png&quot;&gt;&lt;img src=&quot;/img/posts/github-package-git.png&quot; alt=&quot;Git for Atom&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;github-breaks-out-of-the-browser&quot;&gt;GitHub breaks out of the browser&lt;/h3&gt;

&lt;p&gt;If you use GitHub to share and collaborate on code, pull requests are an integral part of your workflow. The GitHub package displays the pull request associated with your current branch in the sidebar, and can display a detailed view of any issue or pull request right alongside your code.&lt;/p&gt;

&lt;p&gt;Integration with GitHub is still very early stage, and we’ve labeled it as a “preview;” we hope to have improvements in this area for you soon.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/posts/github-package-github.png&quot;&gt;&lt;img src=&quot;/img/posts/github-package-github.png&quot; alt=&quot;GitHub for Atom&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;so-much-more-to-come&quot;&gt;So much more to come&lt;/h3&gt;

&lt;p&gt;Today’s release of the GitHub package marks the first step toward realizing its core goal: reduce context switching and increase productivity by bringing core workflow tools directly into your editor. &lt;a href=&quot;https://github.com/kuychaco&quot;&gt;@kuychaco&lt;/a&gt;, &lt;a href=&quot;https://github.com/smashwilson&quot;&gt;@smashwilson&lt;/a&gt;, and &lt;a href=&quot;https://github.com/BinaryMuse&quot;&gt;@BinaryMuse&lt;/a&gt; are hard at work on this, and we hope to have improvements and new features to share with you soon.&lt;/p&gt;

&lt;p&gt;The GitHub package is available &lt;a href=&quot;https://atom.io/beta&quot;&gt;in today’s 1.18 beta release&lt;/a&gt;. Check it out and tell us what you think by dropping us a line &lt;a href=&quot;http://atom-slack.herokuapp.com/&quot;&gt;in Slack&lt;/a&gt; or by creating &lt;a href=&quot;https://github.com/atom/github&quot;&gt;an issue in the package’s repository on GitHub&lt;/a&gt;! And if you’re curious about how we implemented our Git integration, be sure to checkout &lt;a href=&quot;https://githubengineering.com/integrating-git-in-atom/&quot;&gt;our post on the GitHub Engineering blog&lt;/a&gt;.&lt;/p&gt;</content><author><name>BinaryMuse</name></author><summary type="html">A text editor is at the core of the developer’s toolbox, but many other useful pieces of software coexist along with it, such as Git and GitHub. Starting today, Atom adds Git and GitHub integration directly in Atom via the GitHub package. This is a new core package included with Atom and is available right now in today’s 1.18 beta release. Be sure to check out github.atom.io for more information!</summary></entry><entry><title type="html">Atom 1.17</title><link href="http://blog.atom.io/2017/05/16/atom-1-17.html" rel="alternate" type="text/html" title="Atom 1.17" /><published>2017-05-16T00:00:00+00:00</published><updated>2017-05-16T00:00:00+00:00</updated><id>http://blog.atom.io/2017/05/16/atom-1-17</id><content type="html" xml:base="http://blog.atom.io/2017/05/16/atom-1-17.html">&lt;p&gt;&lt;img src=&quot;/img/posts/release-1-17.png&quot; alt=&quot;Atom 1.17&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Today’s &lt;a href=&quot;https://atom.io&quot;&gt;Atom 1.17&lt;/a&gt; release comes with the introduction of docks, faster startup time with V8 snapshots, farewell to jQuery and other improvements.&lt;/p&gt;

&lt;!--more--&gt;

&lt;h3 id=&quot;introducing-docks&quot;&gt;Introducing Docks&lt;/h3&gt;

&lt;p&gt;Docks are an extension of Atom’s pane system designed to hold interface elements that you want to quickly toggle into and out of view. This is a common pattern for &lt;em&gt;tool panels&lt;/em&gt; such as the tree view, debugger controls, terminals, consoles, regex railroad diagrams, etc.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/posts/docks-demo.gif&quot; alt=&quot;Docks Demo&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Docks provide a high-level API that makes it simpler for package authors to implement this kind of easy-to-toggle panel and give users a lot more control over how their panels are arranged. Just like panes in the center of the Atom workspace, panes within docks can be split and resized in arbitrary ways, and since dock panes can contain multiple tabbed items, it’s now possible for tool panels written by different package authors to coherently share screen real estate at the periphery of the workspace.&lt;/p&gt;

&lt;p&gt;For now, the tree-view is the only part of the default Atom UI that will make use of docks, but we’d love for package authors to start experimenting during the beta period. At the API level, you add items to docks in much the same way you’ve always added items to the center of the workspace, via &lt;code class=&quot;highlighter-rouge&quot;&gt;atom.workspace.open&lt;/code&gt;. Dock items are just like regular pane items, but they also need implement the &lt;code class=&quot;highlighter-rouge&quot;&gt;getDefaultLocation()&lt;/code&gt; method and return &lt;code class=&quot;highlighter-rouge&quot;&gt;'left'&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;'right'&lt;/code&gt;, or &lt;code class=&quot;highlighter-rouge&quot;&gt;'bottom'&lt;/code&gt; rather than the default value of &lt;code class=&quot;highlighter-rouge&quot;&gt;'center'&lt;/code&gt;. We’ve also made it possible to pass items directly to &lt;code class=&quot;highlighter-rouge&quot;&gt;atom.workspace.open&lt;/code&gt; instead of forcing you to specify a URI and custom opener. So, to summarize, a minimal code snippet that adds an item to a dock looks like the following.&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kr&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;element&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'div'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;getTitle&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'My Fabulous Div'&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;getDefaultLocation&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'left'&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;atom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;workspace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;We’ve added a &lt;a href=&quot;http://flight-manual.atom.io/hacking-atom/sections/package-active-editor-info/&quot;&gt;new tutorial&lt;/a&gt; to the flight manual that covers docks. You can also &lt;a href=&quot;https://atom.io/docs/api/v1.17.0/Dock&quot;&gt;dig into the API&lt;/a&gt; for other facilities such as the ability to limit items to specific locations, specify default dimensions, toggle dock item visibility, and more.&lt;/p&gt;

&lt;p&gt;Also check out &lt;a href=&quot;https://github.com/atom/tree-view/pull/1056/files&quot;&gt;this tree-view PR&lt;/a&gt; for an example of converting a panel to a dock item. One major thing worth noting is that panes and items within docks are now included in various global workspace methods such as &lt;code class=&quot;highlighter-rouge&quot;&gt;getActivePaneItem&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;observeActivePane&lt;/code&gt;, etc. If you want to limit your scope to just the &lt;em&gt;center&lt;/em&gt; of the workspace as was the case before docks existed, you’ll need to interact with the new &lt;code class=&quot;highlighter-rouge&quot;&gt;WorkspaceCenter&lt;/code&gt; class, available via &lt;code class=&quot;highlighter-rouge&quot;&gt;atom.workspace.getCenter()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A huge thanks to Facebook’s &lt;a href=&quot;https://nuclide.io/&quot;&gt;Nuclide&lt;/a&gt; team for developing docks and taking the time to upstream this feature into the core of Atom.&lt;/p&gt;

&lt;h3 id=&quot;faster-startup-time-with-v8-snapshots&quot;&gt;Faster startup time with V8 snapshots&lt;/h3&gt;

&lt;p&gt;We’ve dramatically reduced window load times by using &lt;a href=&quot;http://blog.atom.io/2017/04/18/improving-startup-time.html&quot;&gt;V8 custom startup snapshots&lt;/a&gt; to shift work that was happening on window startup to happen during Atom’s build instead.&lt;/p&gt;

&lt;h3 id=&quot;farewell-to-jquery&quot;&gt;Farewell to jQuery&lt;/h3&gt;

&lt;p&gt;We have now removed jQuery completely as a dependency of Atom’s bundled packages, which will result in improved performance by avoiding some forced reflows during DOM manipulation. Here are some of the PRs.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/snippets/pull/233&quot;&gt;Replaced atom-space-pen-views with etch and, where appropriate, also manual DOM manipulation&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/spell-check/pull/193&quot;&gt;Using atom-select-list as a drop-in replacement for atom-space-pen-views&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/settings-view/pull/913&quot;&gt;Removed atom-space-pen-views&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/timecop/pull/23&quot;&gt;Overhauled package and remove atom-space-pen-views&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/image-view/pull/82&quot;&gt;Replaced atom-space-pen-views with etch&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/archive-view/pull/45&quot;&gt;Overhauled ArchiveView and remove atom-space-pen-views&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;other-improvements&quot;&gt;Other Improvements&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/pull/14063&quot;&gt;Fix for middle-mouse-button paste on Linux&lt;/a&gt;. Thanks to &lt;a href=&quot;https://github.com/dietmar&quot;&gt;@dietmar&lt;/a&gt; for fixing a &lt;a href=&quot;https://github.com/atom/atom/issues/8648&quot;&gt;long-standing issue&lt;/a&gt;!&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/pull/13963&quot;&gt;Restore the Atom environment when adding project folders to a fresh window&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don’t forget to check out all the other improvements shipping with this version in the &lt;a href=&quot;https://github.com/atom/atom/releases/tag/v1.17.0&quot;&gt;release notes&lt;/a&gt;! :memo:&lt;/p&gt;

&lt;h2 id=&quot;atom-118-beta&quot;&gt;Atom 1.18 Beta&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/img/release-beta.png&quot; alt=&quot;Atom Beta&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;git-and-github-integration&quot;&gt;Git and GitHub Integration&lt;/h3&gt;

&lt;p&gt;We’re thrilled to be shipping rich integration with Git and GitHub in Atom 1.18! This is merely the first release but we’re excited about what it already brings to the editor. Check out posts &lt;a href=&quot;http://blog.atom.io/2017/05/16/git-and-github-integration-comes-to-atom.html&quot;&gt;here&lt;/a&gt; and on the &lt;a href=&quot;https://githubengineering.com/integrating-git-in-atom/&quot;&gt;GitHub engineering blog&lt;/a&gt; for more details. Our very own &lt;a href=&quot;https://github.com/haacked&quot;&gt;Phil Haack&lt;/a&gt; is putting it through its paces in a &lt;a href=&quot;https://githubuniverse.com/satellite/schedule.html#github-beyond-your-browser&quot;&gt;talk at GitHub Satellite&lt;/a&gt; next week in London!&lt;/p&gt;

&lt;h3 id=&quot;more-improvements&quot;&gt;More Improvements&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/first-mate/issues/93&quot;&gt;Improved tokenizing performance via oniguruma caching&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/pull/14287&quot;&gt;Correctly launch Atom from Windows Subsystem for Linux&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/pull/13947&quot;&gt;Added an option to always restore previous session&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/find-and-replace/pull/847&quot;&gt;Added settings for showing context in find-and-replace&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/autocomplete-html/pulls?utf8=%E2%9C%93&amp;amp;q=is%3Apr%20is%3Aclosed%20author%3A50wliu%20updated%3A%3C2017-05-04&quot;&gt;Improved suggestions in autocomplete-html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are many more details in the &lt;a href=&quot;https://github.com/atom/atom/releases/tag/v1.18.0-beta0&quot;&gt;release notes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Get all these improvements today by joining the &lt;a href=&quot;https://atom.io/beta&quot;&gt;Atom Beta Channel&lt;/a&gt;!&lt;/p&gt;</content><author><name>iolsen</name></author><summary type="html">Today’s Atom 1.17 release comes with the introduction of docks, faster startup time with V8 snapshots, farewell to jQuery and other improvements.</summary></entry><entry><title type="html">Improving Startup Time</title><link href="http://blog.atom.io/2017/04/18/improving-startup-time.html" rel="alternate" type="text/html" title="Improving Startup Time" /><published>2017-04-18T00:00:00+00:00</published><updated>2017-04-18T00:00:00+00:00</updated><id>http://blog.atom.io/2017/04/18/improving-startup-time</id><content type="html" xml:base="http://blog.atom.io/2017/04/18/improving-startup-time.html">&lt;p&gt;Over the last months, the Atom team has been working hard on improving one of the aspects of the editor our users care about the most: startup time. We will first provide the reader with some background about why reducing startup time is a non-trivial task, then illustrate the optimizations we have shipped in Atom 1.17 (currently in &lt;a href=&quot;https://atom.io/beta&quot;&gt;beta&lt;/a&gt;) and, finally, describe what other improvements to expect in the future.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/posts/startup-time.png&quot; alt=&quot;Startup Time Illustration&quot; /&gt;&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;For a long time, we’ve been wanting to have more control over Atom’s startup code. In November of last year, as part of this effort, we created an &lt;a href=&quot;https://github.com/atom/atom/issues/13253&quot;&gt;in-depth issue&lt;/a&gt; that carefully described where time was spent when opening an Atom window. We realized that many of the operations happening during startup were redundant and that we could use the information we knew at build-time to minimize their cost.&lt;/p&gt;

&lt;h3 id=&quot;v8-snapshots&quot;&gt;V8 snapshots&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://v8project.blogspot.it/2015/09/custom-startup-snapshots.html&quot;&gt;V8 snapshots&lt;/a&gt; allow Electron applications to execute some arbitrary JavaScript code and output a binary file containing a serialized heap with all the data that is left in memory after running a GC at the end of the provided script.&lt;/p&gt;

&lt;p&gt;This perfectly suits the startup scenario described above because snapshots can be used to eagerly perform work when building Atom; then, at runtime, we can simply reuse the JavaScript objects that were created as part of the snapshotting phase, thus reducing the amount of work needed to load a window. The tricky part of using this technology, however, is that the code is executed in a bare V8 context. In other words, it only allows us to run plain JavaScript code and does not provide access to native modules, Node/Electron APIs or DOM manipulation.&lt;/p&gt;

&lt;p&gt;While this constraint was remarkably restrictive, we still saw a great potential in using snapshots as a tool to make our startup situation better, and so we started experimenting with different approaches that could allow us to use them in Atom. One of them was to try using V8 native APIs to load Node/Electron into the snapshot context so that we could work around the limitation of not being able to use modules like &lt;code class=&quot;highlighter-rouge&quot;&gt;path&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;fs&lt;/code&gt;, etc. This turned out to be non-trivial though, especially because some of the modules that Electron and Node access when they boot up rely on native code, which is very difficult to deal with in snapshots.&lt;/p&gt;

&lt;p&gt;Therefore, in order to circumvent some of the restrictions discussed above, we started exploring a simpler approach. Specifically, we decided to defer the usage of forbidden APIs until runtime so that all the other computation could still happen as part of the snapshot script. To do so, we set out to create a tool that automated this process without compromising code readability: electron-link.&lt;/p&gt;

&lt;h3 id=&quot;electron-link&quot;&gt;electron-link&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/atom/electron-link&quot;&gt;electron-link&lt;/a&gt; is a node module that takes a JavaScript file (typically the entry point of an application) and a list of modules that need to be required lazily (see &lt;a href=&quot;https://github.com/atom/atom/blob/d9ebd7e125d5f07def1a057a0a8278d4d9d7d23a/script/lib/generate-startup-snapshot.js#L19-L65&quot;&gt;Atom’s build scripts&lt;/a&gt; for an example). Then, starting from that file, it traverses the entire require graph and replaces all the forbidden &lt;code class=&quot;highlighter-rouge&quot;&gt;require&lt;/code&gt; calls in each file with a function that will be called at runtime. The output is a single script containing the code for all the modules reachable from the entry point. This file can be then supplied to &lt;code class=&quot;highlighter-rouge&quot;&gt;mksnapshot&lt;/code&gt; to generate the snapshot blob, which will be eventually used by Electron.&lt;/p&gt;

&lt;p&gt;electron-link can also determine whether a module can be snapshotted or not. For instance, the following code can be snapshotted:&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kr&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'path'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'a'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'b'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'c'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;And generates the following code:&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;get_path&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'path'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;get_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'a'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'b'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'c'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;You can notice that the above code is valid because the forbidden module (i.e. &lt;code class=&quot;highlighter-rouge&quot;&gt;path&lt;/code&gt;) is used inside a function that doesn’t get called when requiring the script. On the other hand, when trying to process the following code, electron-link will throw an error because it is trying to access a forbidden module right when it gets required:&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kr&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'path'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'a'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'b'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'c'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Being a tool based on static analysis, however, electron-link is unable to detect all the cases where a piece of code can’t be included in a snapshot. Therefore, as part of the build process, Atom will &lt;a href=&quot;https://github.com/atom/atom/blob/d9ebd7e125d5f07def1a057a0a8278d4d9d7d23a/script/lib/generate-startup-snapshot.js#L70-L71&quot;&gt;run the generated JavaScript file&lt;/a&gt; in an empty V8 context (similar to the one provided by &lt;code class=&quot;highlighter-rouge&quot;&gt;mksnapshot&lt;/code&gt;) and catch any invalid code that potentially slipped through.&lt;/p&gt;

&lt;h3 id=&quot;custom-elements-and-jquery&quot;&gt;Custom Elements and jQuery&lt;/h3&gt;

&lt;p&gt;As you may remember from the previous section, requiring native modules or using Node APIs is not the only forbidden operation in V8 snapshots. In fact, DOM APIs can’t be accessed either when requiring a script. This was quite challenging from a technical standpoint, because many of our bundled packages used jQuery or HTML custom elements. The former used some feature detection techniques that relied on DOM globals, while, in order to use the latter, objects needed to extend the &lt;code class=&quot;highlighter-rouge&quot;&gt;HTMLElement&lt;/code&gt; class, which is not available when generating a snapshot.&lt;/p&gt;

&lt;p&gt;To solve both of these issues we could have taken some shortcuts by, for example, patching jQuery to stop performing feature detection at require time. However, we realized that neither jQuery nor custom elements were providing any tangible benefit to our users. In the case of jQuery it was quite the opposite, as sometimes it would cause unnecessary DOM reflows and a slower user experience. As such, we decided to take this as an opportunity to remove them from the codebase and improve Atom’s code quality.&lt;/p&gt;

&lt;p&gt;For the most curious, &lt;a href=&quot;https://github.com/atom/atom/issues/13254&quot;&gt;#13254&lt;/a&gt; provides a summary of all the work that went into this process, along with the relevant pull requests.&lt;/p&gt;

&lt;h3 id=&quot;improving-require-time&quot;&gt;Improving &lt;code class=&quot;highlighter-rouge&quot;&gt;require&lt;/code&gt; time&lt;/h3&gt;

&lt;p&gt;All the tasks illustrated in the sections above laid the groundwork for finally reducing startup time. After dealing with all those roadblocks, we started addressing one of the major sources of slowness when opening Atom: calling &lt;code class=&quot;highlighter-rouge&quot;&gt;require&lt;/code&gt;. Requiring a module involves the following steps:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Resolving the module, as explained in &lt;a href=&quot;https://nodejs.org/api/modules.html#modules_all_together&quot;&gt;Node’s documentation&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Reading synchronously its contents.&lt;/li&gt;
  &lt;li&gt;Compiling it.&lt;/li&gt;
  &lt;li&gt;Executing it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of them has a cost, and in a big codebase like Atom’s this cost is even more emphasized. For instance, take the following CPU profile of the initialization code:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/482957/24651248/64939ff2-192d-11e7-9101-5cb22a7aa1da.png&quot; alt=&quot;before-require-improvements&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can notice how a lot of it is spent in &lt;code class=&quot;highlighter-rouge&quot;&gt;Module._compile&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;require&lt;/code&gt;. On average it took &lt;code class=&quot;highlighter-rouge&quot;&gt;~ 0.9s-1.0s&lt;/code&gt; to load a stock Atom window and activate its packages when no editor was open and the tree-view was closed. By using snapshots, we were able to cut this cost down to &lt;code class=&quot;highlighter-rouge&quot;&gt;~ 0.7s-0.8s&lt;/code&gt;, thus improving startup time by 15-20%.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/482957/24651246/64864370-192d-11e7-85db-7ee669b36a07.png&quot; alt=&quot;after-require-improvements&quot; /&gt;&lt;/p&gt;

&lt;p&gt;For more details, please check out &lt;a href=&quot;https://github.com/atom/atom/pull/13916&quot;&gt;#13916&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;eagerly-constructing-the-atom-global&quot;&gt;Eagerly constructing the &lt;code class=&quot;highlighter-rouge&quot;&gt;atom&lt;/code&gt; global&lt;/h3&gt;

&lt;p&gt;Atom exposes many of its functionality through the &lt;code class=&quot;highlighter-rouge&quot;&gt;atom&lt;/code&gt; global. This object is an instance of &lt;code class=&quot;highlighter-rouge&quot;&gt;AtomEnvironment&lt;/code&gt; and, when created, takes care of loading the workspace, keymaps, configuration, etc. This is summarized by the following CPU profile:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/482957/24651244/64709aac-192d-11e7-9da2-712ebfc9d38b.png&quot; alt=&quot;before-atom-env-improvements&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Even though some of these tasks are dynamic (e.g. reading the user’s configuration), others are repeated every time a new window is created and, thus, waste CPU cycles and I/O resources. Similarly to what we did for requiring modules, we used snapshots to improve this code path, making it two times faster.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/482957/24651245/64732542-192d-11e7-8108-1e1bae8cd7cb.png&quot; alt=&quot;after-atom-env-improvements&quot; /&gt;&lt;/p&gt;

&lt;p&gt;For more details, please check out &lt;a href=&quot;https://github.com/atom/atom/pull/14024&quot;&gt;#14024&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;optimizing-style-sheet-loading&quot;&gt;Optimizing style sheet loading&lt;/h3&gt;

&lt;p&gt;After the improvements described above, all the noise related to requiring modules and constructing the &lt;code class=&quot;highlighter-rouge&quot;&gt;AtomEnvironment&lt;/code&gt; disappeared from the graph, which emphasized other problems that were affecting startup time. Specifically, we started noticing that reading style sheets was causing significant slowdowns, especially on machines with a slow hard drive:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/482957/24651247/64872dc6-192d-11e7-9b64-e1a54be9e2db.png&quot; alt=&quot;before-style-sheets-improvements&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Almost every package that ships with Atom has a style sheet that customizes its appearance; considering that we ship 58 packages, we decided to bake all the core style sheets into the snapshot in order to make them already available when loading core packages at runtime. This resulted in a &lt;code class=&quot;highlighter-rouge&quot;&gt;~ 100ms&lt;/code&gt; improvement on a fast machine with an SSD but, since most of this work was I/O bound, we expect it to be even more noticeable on slower hardware.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/482957/24651243/646f6876-192d-11e7-80d6-11a30e207dc9.png&quot; alt=&quot;after-style-sheets-improvements&quot; /&gt;&lt;/p&gt;

&lt;p&gt;For more details, please check out &lt;a href=&quot;https://github.com/atom/atom/pull/14038&quot;&gt;#14038&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;preloading-bundled-packages&quot;&gt;Preloading bundled packages&lt;/h3&gt;

&lt;p&gt;The last optimization that could be achieved thanks to snapshots was to reduce the cost associated to loading and activating bundled packages. This involves reading keymaps, settings, menus, etc. and registering them. As shown in the CPU profile below, doing this work in the snapshot allowed us to save &lt;code class=&quot;highlighter-rouge&quot;&gt;~ 60-90ms&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/482957/24651242/646efdb4-192d-11e7-9a4b-ec33cee7866d.png&quot; alt=&quot;after-packages-preloading&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This is confirmed by Timecop, which highlights how packages loading alone became almost instantaneous:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/482957/24651241/646e8398-192d-11e7-9bc7-79b0dc789064.png&quot; alt=&quot;timecop-after-packages-preloading&quot; /&gt;&lt;/p&gt;

&lt;p&gt;For more details, please check out &lt;a href=&quot;https://github.com/atom/atom/pull/14080&quot;&gt;#14080&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;This marks the end of the first round of performance improvements to startup time. Overall, on a stock installation, we made loading Atom almost &lt;strong&gt;50% faster&lt;/strong&gt; and snapshots were a crucial tool that enabled some otherwise impossible optimizations.&lt;/p&gt;

&lt;p&gt;Performance continues to be one of the concerns the Atom team cares about the most. We believe there are still many things we can do to reduce startup time even further and, in the future, we would like to explore an approach where we take full advantage of Electron’s multi-process architecture. Specifically, the main process (which was not affected by the improvements described in this blog post) and the renderer process could load almost in parallel, as opposed to the current situation where we fully load the main process first and only then spawn child renderer processes.&lt;/p&gt;

&lt;p&gt;As always, we will keep you posted as we make progress on these enhancements. In the meantime we hope you will enjoy opening your editor faster with &lt;a href=&quot;https://atom.io/beta&quot;&gt;Atom 1.17 Beta&lt;/a&gt;! :zap:&lt;/p&gt;</content><author><name>as-cii</name></author><summary type="html">Over the last months, the Atom team has been working hard on improving one of the aspects of the editor our users care about the most: startup time. We will first provide the reader with some background about why reducing startup time is a non-trivial task, then illustrate the optimizations we have shipped in Atom 1.17 (currently in beta) and, finally, describe what other improvements to expect in the future.</summary></entry><entry><title type="html">Atom 1.16</title><link href="http://blog.atom.io/2017/04/12/atom-1-16.html" rel="alternate" type="text/html" title="Atom 1.16" /><published>2017-04-12T00:00:00+00:00</published><updated>2017-04-12T00:00:00+00:00</updated><id>http://blog.atom.io/2017/04/12/atom-1-16</id><content type="html" xml:base="http://blog.atom.io/2017/04/12/atom-1-16.html">&lt;p&gt;&lt;img src=&quot;/img/posts/release-1-16.png&quot; alt=&quot;Atom 1.16&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Today’s &lt;a href=&quot;https://atom.io&quot;&gt;Atom 1.16&lt;/a&gt; release comes with two more macOS title bar options, a push to remove jQuery and other improvements.&lt;/p&gt;

&lt;!--more--&gt;

&lt;h3 id=&quot;more-title-bar-options-macos&quot;&gt;More title bar options (macOS)&lt;/h3&gt;

&lt;p&gt;On macOS you can now choose between two more title bar options (&lt;code class=&quot;highlighter-rouge&quot;&gt;Settings &amp;gt; Core Settings &amp;gt; Title Bar&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Option 1: &lt;code class=&quot;highlighter-rouge&quot;&gt;custom-inset&lt;/code&gt; adds a bit more padding around the “traffic lights”. This might not seem that useful on first glance, but the “traffic lights” will look more aligned when combined with something that needs more height. For example when the title bar gets replaced with a tool bar.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/378023/21953493/4a8b4b36-da7c-11e6-9938-7ffc62e8e495.png&quot; alt=&quot;custom-inset title bar&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Option 2: &lt;code class=&quot;highlighter-rouge&quot;&gt;hidden&lt;/code&gt; completely removes the title bar for people that like things minimalistic or want to save an extra 22 pixels. To drag the window the status bar can be used.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/378023/21953494/4a8c607a-da7c-11e6-8ffa-2400c07e1233.png&quot; alt=&quot;hidden title bar&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Note that by enabling these options some functionality will be lost. Especially when the title bar is hidden managing the window needs to be done with keyboard shortcuts or using the menu.&lt;/p&gt;

&lt;p&gt;Don’t forget to check out all the other improvements shipping with this version in the &lt;a href=&quot;https://github.com/atom/atom/releases/tag/v1.16.0&quot;&gt;release notes&lt;/a&gt;! :memo:&lt;/p&gt;

&lt;h3 id=&quot;project-search-performance&quot;&gt;Project search performance&lt;/h3&gt;

&lt;p&gt;We’ve improved the performance of displaying project search results by only rendering visible DOM nodes.&lt;/p&gt;

&lt;h2 id=&quot;atom-117-beta&quot;&gt;Atom 1.17 Beta&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/img/release-beta.png&quot; alt=&quot;Atom 1.17&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;introducing-docks&quot;&gt;Introducing Docks&lt;/h3&gt;

&lt;p&gt;Docks are an extension of Atom’s pane system designed to hold interface elements that you want to quickly toggle into and out of view. This is a common pattern for &lt;em&gt;tool panels&lt;/em&gt; such as the tree view, debugger controls, terminals, consoles, regex railroad diagrams, etc.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/posts/docks-demo.gif&quot; alt=&quot;Docks Demo&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Docks provide a high-level API that makes it simpler for package authors to implement this kind of easy-to-toggle panel and give users a lot more control over how their panels are arranged. Just like panes in the center of the Atom workspace, panes within docks can be split and resized in arbitrary ways, and since dock panes can contain multiple tabbed items, it’s now possible for tool panels written by different package authors to coherently share screen real estate at the periphery of the workspace.&lt;/p&gt;

&lt;p&gt;For now, the tree-view is the only part of the default Atom UI that will make use of docks, but we’d love for package authors to start experimenting during the beta period. At the API level, you add items to docks in much the same way you’ve always added items to the center of the workspace, via &lt;code class=&quot;highlighter-rouge&quot;&gt;atom.workspace.open&lt;/code&gt;. Dock items are just like regular pane items, but they also need implement the &lt;code class=&quot;highlighter-rouge&quot;&gt;getDefaultLocation()&lt;/code&gt; method and return &lt;code class=&quot;highlighter-rouge&quot;&gt;'left'&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;'right'&lt;/code&gt;, or &lt;code class=&quot;highlighter-rouge&quot;&gt;'bottom'&lt;/code&gt; rather than the default value of &lt;code class=&quot;highlighter-rouge&quot;&gt;'center'&lt;/code&gt;. We’ve also made it possible to pass items directly to &lt;code class=&quot;highlighter-rouge&quot;&gt;atom.workspace.open&lt;/code&gt; instead of forcing you to specify a URI and custom opener. So, to summarize, a minimal code snippet that adds an item to a dock looks like the following.&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kr&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;element&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'div'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;getTitle&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'My Fabulous Div'&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;getDefaultLocation&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'left'&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;atom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;workspace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;We’ve added a &lt;a href=&quot;http://flight-manual.atom.io/hacking-atom/sections/package-active-editor-info/&quot;&gt;new tutorial&lt;/a&gt; to the flight manual that covers docks. You can also dig into the API for other facilities such as the ability to limit items to specific locations, specify default dimensions, toggle dock item visibility, and more. Until 1.17 lands on stable and we update our official API documentation, you’ll need to consult the source code to do so… here are the relevant classes:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/blob/e0309883bbdaf75973689961ddbc75333cd5c46e/src/workspace.js#L24&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;Workspace&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/blob/e0309883bbdaf75973689961ddbc75333cd5c46e/src/dock.js#L16&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;Dock&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/blob/e0309883bbdaf75973689961ddbc75333cd5c46e/src/workspace-center.js&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;WorkspaceCenter&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also check out &lt;a href=&quot;https://github.com/atom/tree-view/pull/1056/files&quot;&gt;this tree-view PR&lt;/a&gt; for an example of converting a panel to a dock item. One major thing worth noting is that panes and items within docks are now included in various global workspace methods such as &lt;code class=&quot;highlighter-rouge&quot;&gt;getActivePaneItem&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;observeActivePane&lt;/code&gt;, etc. If you want to limit your scope to just the &lt;em&gt;center&lt;/em&gt; of the workspace as was the case before docks existed, you’ll need to interact with the new &lt;code class=&quot;highlighter-rouge&quot;&gt;WorkspaceCenter&lt;/code&gt; class, available via &lt;code class=&quot;highlighter-rouge&quot;&gt;atom.workspace.getCenter()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A huge thanks to Facebook’s &lt;a href=&quot;https://nuclide.io/&quot;&gt;Nuclide&lt;/a&gt; team for developing docks and taking the time to upstream this feature into the core of Atom.&lt;/p&gt;

&lt;h3 id=&quot;faster-startup-time-with-v8-snapshots&quot;&gt;Faster startup time with V8 snapshots&lt;/h3&gt;

&lt;p&gt;We’ve dramatically reduced window load times by using &lt;a href=&quot;https://v8project.blogspot.com/2015/09/custom-startup-snapshots.html&quot;&gt;V8 custom startup snapshots&lt;/a&gt; to shift work that was happening on window startup to happen during Atom’s build instead. We’ll have an in-depth post on this next week.&lt;/p&gt;

&lt;h3 id=&quot;farewell-to-jquery&quot;&gt;Farewell to jQuery&lt;/h3&gt;

&lt;p&gt;We have now removed jQuery completely as a dependency of Atom’s bundled packages, which will result in improved performance by avoiding some forced reflows during DOM manipulation. Here are some of the PRs.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/snippets/pull/233&quot;&gt;Replaced atom-space-pen-views with etch and, where appropriate, also manual DOM manipulation&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/spell-check/pull/193&quot;&gt;Using atom-select-list as a drop-in replacement for atom-space-pen-views&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/settings-view/pull/913&quot;&gt;Removed atom-space-pen-views&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/timecop/pull/23&quot;&gt;Overhauled package and remove atom-space-pen-views&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/image-view/pull/82&quot;&gt;Replaced atom-space-pen-views with etch&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/archive-view/pull/45&quot;&gt;Overhauled ArchiveView and remove atom-space-pen-views&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;other-improvements&quot;&gt;Other Improvements&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/pull/14063&quot;&gt;Fix for middle-mouse-button paste on Linux&lt;/a&gt; thanks to &lt;a href=&quot;https://github.com/dietmar&quot;&gt;@dietmar&lt;/a&gt; for fixing a &lt;a href=&quot;https://github.com/atom/atom/issues/8648&quot;&gt;long-standing issue&lt;/a&gt;!&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/atom/atom/pull/13963&quot;&gt;Restore the Atom environment when adding project folders to a fresh window&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are many more details in the &lt;a href=&quot;https://github.com/atom/atom/releases/tag/v1.17.0-beta0&quot;&gt;release notes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Get all these improvements today by joining the &lt;a href=&quot;https://atom.io/beta&quot;&gt;Atom Beta Channel&lt;/a&gt;!&lt;/p&gt;</content><author><name>andreagriffiths11</name></author><summary type="html">Today’s Atom 1.16 release comes with two more macOS title bar options, a push to remove jQuery and other improvements.</summary></entry></feed>