Atom 1.3
December 11, 2015 benogle
Atom 1.3 and 1.4-beta are out. Atom 1.3 comes with start up speed improvements, find performance improvements, and portable mode.
Major Changes in 1.3.0 Stable
Check out the releases page for all changes in 1.3.
Startup speed improvements
One of the team focuses has been improving performance, and we’re happy to report that we’ve been making great progress in the startup department. All in, these changes contribute to a 20% - 30% speedup depending on how many packages you have installed. We’ll go into more depth in another post, but if you’re interested, check out the pull requests.
- NativeCompileCache
- Unfold all improvements
- Lazy-load of snippets
- Improved config loading, and even more improvement
Marker (find and replace!) speed improvements
Along the performance improvement theme, we’ve been focusing on improving the data structures related to markers. Markers are pretty core to Atom—they are the underpinnings for cursors, selections, the autocomplete suggestion box, and find result markers. Making them fast will improve performance for all of these cases, especially when there are tons of markers defined.
The original B+ tree index we blogged about earlier this year has now been replaced with a new data structure based on a randomized variant of balanced binary trees known as a treap. In addition to using a clearer, more efficient algorithm, we’ve also dropped the index to C++ for maximal performance and minimal impact on the v8 heap. Treaps are proving to be a useful approach for indexing state that tracks the contents of buffers, and we’re currently in the process of converting to a similar data structure to more efficiently track the spatial relationship between screen coordinates and buffer coordinates in the presence of transformations such as hard tab expansion, folds, and soft wraps.
Marker Layers
Just as important as algorithmic improvements, we’ve also introduced a new API construct called marker layers. We found firing creation events to be a large source of overhead when creating tons of markers, but most of our creation handlers were only acting on a small subset of the total markers in the system. Marker layers make this explicit, allowing you to subscribe to events on a limited set of markers. With this change, we can limit the cost of creating markers and allow packages to selectively expose their markers to other packages, giving you the choice of whether you want your markers to be part of your API or just an implementation detail.
It’s worth noting that search result and selection markers are no longer available via the default marker layer. If you need access to search result markers, you can use the new service exposed by the find-and-replace
package. Selections have their own editor-level APIs, so direct marker access shouldn’t be necessary. Talk to us if you disagree.
Portable mode
Windows portable mode has been a heavily requested feature for a long time. Atom 1.3.0 has a portable mode for Windows and Linux (with Mac on the way).
- Portable mode for Windows
- Portable mode for Linux
- A command line param to setup a portable .atom directory
Updates to moving lines in the buffer
When Auto Indent
option is checked, moving lines up and down will autoindent the moving line. See the pull request for more details.
Additionally, moving lines in the buffer now works with multiple cursors. A big shout out goes to @lpommers and @abe33 for their tenacity in getting this change in. Check out the the pull request to see all that went into it (86 comments spanning 3 months!).
Upgrade to Electron 0.34.3
Atom 1.3.0 is on Electron 0.34.3, which fixed a few issues on Windows.
Atom 1.4.0-beta0 Available now
With every stable release comes a new beta release. Note that you can always install the beta to get these features right now.
Notable new things are:
- Untitled or unsaved buffers are now automatically saved to a temporary location when closing or restarting an Atom window. View the pull request.
- A OS X dock menu was added with a ‘New Window’ option. View the pull request.
For now, you can check out all the PRs that went into 1.4-beta. We will talk about all the new stuff in 1.4 when it is released.