Improving performance at scale
Improving performance at scale
Over the past two months we received reports of slow performance affecting some of the larger Linear workspaces. We looked into the issues, and even made some changes to speed up the app, but determined that fixing the problem would require deeper work. Over the last couple of weeks, we have been heads down implementing fixes and planning larger changes to Linear's architecture to support the long term scalability of the service.
Unfortunately what makes Linear extremely fast for most users can also make it slow for others if we scale faster than expected, which we did. This stems from technical architecture choices we made to build Linear and their trade-offs. This didn't come as a surprise to us and we anticipated having to make changes sometime in the future, but not so soon and especially not after customers hit performance issues. We do our best to work on these issues before they can become a problem for an end-user.
This week we shared a pre-mortem that explains Linear's architecture, the performance issues these customers were hitting, and the steps we're taking in the near and short term to address them. While your workspace might not be affected, we wanted to share the document with all of you as we work through these challenges. If you hit performance issues, now or in the future, we'd like you to reach out so that we can fix them. The good news is that thanks to this work, Linear has gotten significantly faster for all users in the past two weeks. We consider speed a core feature of the product and will continue to treat it as a top priority as we scale.
Linear performance pre-mortem ->
Fixes and improvements
- [API]
attachmentsForURL
query now returns a paginated list of results instead of an array - [API]
attachmentIssue
query has been deprecated. Please useattachmentsForURL
withissue
sub-query instead. - Zendesk integration now supports linking multiple issues into a customer ticket
- There's a new "Open issue" action, also accessible through the global OI key shortcut, that lists all the recently accessed issues and enables a quick search through issue titles, similar to how it used to work in the global command menu.
- Notifications for actions that have been changed or undone will no longer show up in your Inbox
- Fixed a bug where codeblocks would cause a CSS bug in issue description & comments
- The "Open projects" list now includes projects from all teams you're part of
- Removed duplicate fullscreen options from the desktop app menu
- Several style fixes for search input fields
- You can now filter issue states in the dropdown in issue create
- You can now unsubscribe from notifications for multiple issues
- Fixed a long-standing bug where lists would render incorrectly
- When creating a new team, we will now use your timezone rather than defaulting to UTC-7, Pacific Time
- Fixed a crash that could occur on the search page when searching a mis-formatted string
- Reduced minimum characters for searching to 2
- Added highlighting to issue identifier matches on the search page
- When using the keyboard shortcut / to focus the search input, the text is selected if the input is not empty for quicker searching
- History and navigation on the search page is improved. The back button and/or clicking the sidebar search button works correctly.
- Searching just for a number "123" will find issues that have 123 in their identifiers
- Fixed potential app crash with strings containing multiple or trailing spaces
- Added ability to clear recent items such as recent search queries or recently viewed issues. You can search for it in the command menu, by typing "clear recent".
- Links to shared custom views are now unfurled when shared to Slack
- Improved issue contextual menus by alphabetically ordering projects, limiting assignee list to issue's team members and improving styling
- Text formatted as inline code can now also have strikethrough formatting
New issue search

New issue search
Today we're rolling out the new search experience which features a more accurate search that searches over issue titles and descriptions as well as expanded functionality.
This new search experience replaces, improves, and consolidates all of our previous search options. It's your new go-to place to quickly find an issue with keywords or by typing its ID, for example, lin123
or LIN-123
. Search terms are highlighted in the list of results to make relevant issues easier to find. Search now also surfaces archived and recently deleted issues. Your recent searches will show up on the search start page, too.
Search is designed to be quickly accessed using the / keyboard shortcut. You can use the new button in the main sidebar which replaces the previous search input box. You can also type search
in the command line to launch it.
Another addition is that we show recently viewed issues on the search start page, which are a convenient shortcut to open an issue. This new feature also comes with a new key binding OI. Try it out!
Fixes and improvements
- API: Issue attachments with the same URL can now be linked to multiple issues. Querying for attachments by using the URL as the
id
is being deprecated, but will return the first attachment with a matching URL for a transition period. - Several performance improvement to loading the application for the first time
- Linear will now open the last used workspace when logging in to an account with multiple workspaces
- Reduced animations preference is now inferred from the OS settings and removed as a user preference
- Fixed "Open cycles" goto-shortcut in Inbox and other non-team views
- Improved reliability of copying issue IDs, URLs and git branches to clipboard
- Fixed copying an image to clipboard (currently not available in Firefox)
- Fixed file upload notification in the new issue composer
- Fixed issues where personal Slack notifications were disconnected unexpectedly
- Contextual menus are now closed from all mouse clicks
- Fixed a bug with the Github Migration Assistant form that was preventing moving to the next step after selecting a repository
- Improved settings to make it more clear how to change or cancel a plan in the Billing view
- Fixed issue which prevented logging into Figma from within the Figma embed in Linear desktop application
Fixes

Fixes and improvements
This week we've been focusing on larger upcoming functionality, so we only have minor fixes and improvements.
- Descript shared URLs are now embedded automatically in issue descriptions and comments.
- Issue editing actions in the fast issue editor now use the same keyboard shortcuts than in the rest of the application. To use the keyboard shortcuts, the title or description fields can't be focused.
- Issue editing actions in the issue view will now open pop-overs attached to the appropriate properties in the side pane.
- Opening issue peek using a quick press on has been fixed to work more reliably
- When pressing "Add label" in the issue view will now bring up a popover that lets you toggle any label on and off.
- When you have a sub-action editor open in the issue view, any issue editing actions triggered via the action menu or keyboard will target that sub-action unless you're hovering over another sub-action
- Issue peek will now disappear when the fast issue editor is opened
- Fixes a regression that could cause startup to be slow, especially on Safari and Firefox
- You can now delete an import up to 7 days after it was created.
- Fixed several bugs with the GitHub importer
- Fixed a bug with our Clubhouse importer
- Inserting a reference to an issue inside a description or a comment won't remove the rest of the sentence after it anymore
- It is now easier to select the workspace where you want an OAuth application to be installed
- Labels with the "%" character, like "50%", will now open correct URLs with proper encoding
- When filtering issues, "By creator" filter will now group all suspended users as a single entry
- Fixed some entries showing twice in the context menu
- The background of modal dialogs are once again tinted darker on macOS
Zendesk integration

Zendesk integration
Working with your customers is key to high-performing product teams. As companies scale, much of the customer requests are piped into customer success tools such as Zendesk. This is why we're excited to add Zendesk to Linear's growing set of integrations.
Your customer success teams can now quickly file bug reports into Linear from within Zendesk and link feature requests to existing issues. We also added automation which re-opens and updates Zendesk tickets after the issue has been resolved (or canceled), so your customer success team can get back to the customer to update them on the progress. The integration makes it easier for your product team to prioritize their work based on customer needs and build a tighter feedback loop with your customers.
To enable the Zendesk integration, install our app from Zendesk Marketplace and enable the integration in your Linear settings.
Other fixes and improvements
- When creating a new team with a team identifier that was previously used by some other team, you can now choose to delete the identifier
- Issues migrated into Linear via the Migration Assistant will now be labeled with "Migrated" rather than "Imported"
- Images included in the issue description markdown will be properly uploaded to Linear even if they are not a top-level document element (e.g., inside of block quotes)
- We now only hint at changing ordering in views that can be manually ordered
- Added a section highlighting the Migration Assistant in the workspace settings overview page
- Attachments are now shown before PR's in the issue view
- The command menu no longer lets you search for issues but you can open specific ones if you type the issue ID
- Improved communication around in-page find functionality
- Fixed a bug where the "Find in page" input field would be incorrectly aligned
- Creating an issue from a message in Slack will now add an issue attachment which links to the original message
- Draft pull requests that are closed will now show as closed on linked issues
- The status control in the "New issue" modal has been moved to make it easier to find.
- Filters that don't match any issues can now also be multi-selected
- Adds create new action from template to keyboard shortcut help
- Due dates in fast issue creator now correctly account for the user's timezone
- Fixed a bug that was preventing OAuth applications from being created
- Jira issues are now imported in the order of creation
- Fixed a bug where the issue status from default templates would not be applied on new issues
- We now display a nicer error message when trying to remove a user from their last team
- Improvements to the rendering of the workspace toggle when the syncing or offline badge is visible
- Images included in comment body markdown will be properly uploaded to Linear even if they are not a top-level document element (e.g., inside of block quotes)
- We will now import comments on issues you are migrating over from GitHub
Smaller improvements and April 22 outage

April 22nd outage
On this Thursday, April 22nd we experienced a prolonged outage. The outage started at 7:25am UTC and lasted for roughly 3 hours during which time Linear was unavailable completely, or in offline mode which caused change syncing to be delayed.
The outage started due to an automatic vacuum process in one of the key tables in our Postgres database. We were getting close to running out of transaction IDs and Postgres forced an autovacuum on us even though the functionality was disabled for the table. Because we are running a managed Postgres instance on GCP, we weren't able to stop the autovacuum process and were forced to wait for it to complete. Once that issue was resolved, we encountered additional issues when trying to bring services online, due to the large number of clients trying to connect at the same time.
We are still investigating the exact details around this and plan to write a longer and more detailed post mortem once our investigation is ready. If you're interested in learning more, follow our Twitter for updates.
UPDATE: Post-mortem is now available
Smaller product improvements
We love launching big new features, but we also love making smaller quality-of-life improvements. This week we focused on smaller improvements across the application. Here are a few highlights.
Private OAuth applications
You can now restrict your OAuth applications to your own workspace by making them private. This is helpful if you have internal applications which rely on Linear as the data source and you need to support authentication for different users. Many services, like Retool, also support OAuth as an API authentication method out of the box as our implementation follows the standard patterns.
Open issue with ID in Linear command menu
We have changed Linear's command menu (Cmdk) to now support opening a specific issue if you write, or paste, its ID to the menu. It even works with our git branch names so you can copy branch names from your terminal and quickly open the issue in Linear. This new implementation replaces issue search inside the command menu which we decided to remove as it was clunky to use and regular search (/) works better for that use case.
Sub-issue status in issue list
Inspired by a user suggestion on Twitter we replaced a sub-issues icon with the status of sub-issue completion in the sub-issues list. This should make it easier to scan and visualize progress. Thanks @maximmart!
Other fixes and improvements
- Better performance when updating action on a large number of issues
- We added a view option to hide completed issues from previous cycles
- Fixed a few timezone options that didn't work (sorry about that, Indianapolis)
- Board columns now scroll items into view when navigating with keyboard
- Fixed roadmap editing using IME inputs
- Fixed an issue where the new issue modal would open with old data
- Fixed the display of the next billing date in billing settings
- Improved the issue modal when used with on-screen keyboards
- Fixed bug where GitHub automation didn't wait for all the open PRs to be merged until closing the issue
- Fixed a bug that could cause Asana imports to result in an error
- Fixed error when non-admins create a new team and copy properties from an existing team
- Fixed the display of cycles in Inbox
- The Linear bot will now post a comment with a linkback to the URL of the issue linked with a GitHub pull request even if you add the URL in the description
- Fixed a bug that made it impossible to undo deleting an issue
- Added more icons to choose from for Views and Projects
- Added the team name to the title in the Recently Deleted page
- Added a hint on how to enable manual sorting if you try dragging items in non-sortable lists
- Fixed a bug where the status of default templates would not be applied for new issues
Auto-archive cycles and projects & deleting issues

Auto-archive cycles and projects
Last year we announced auto-closing and auto-archiving of issues. Now we are extending the auto-archive feature to projects and cycles.
One of the core principles behind the Linear Method is to "keep a manageable backlog." This applies to issues as well as cycles and projects, and adding sensible automation to help you achieve this lets you focus on the things that really matter.
If a project or cycle has been completed more than X months ago (this time period is configurable) and all the issues inside it have been archived, the project or cycle will also be archived. The feature is automatically enabled for all teams that have auto-archiving for issues set up. If you want to enable it for your team or change auto-archiving settings, navigate to Settings > Team > Workflow.
Deleting issues
We made it possible to delete issues. Sometimes issues are created by mistake, and it makes no sense to keep them in the system. You can now delete them by pressing ⌘⌫ (or ⌦ for Windows and Linux users). Deleted issues will be available in the "Recently deleted" view which you can find through the command menu. Issues are permanently deleted after 14 days.
As part of this change, we removed the option to manually archive issues. We found that most users used the archive as a trash can for issues that they wanted to delete. At the same time, auto-archiving puts older completed issues inside the archive, which meant the archive served two disparate purposes.
We wanted to make the concepts around archiving and deleting issues more straightforward. We think that the archive is something that Linear should manage for you while deleting issues is your own choice.
Fixes and improvements
- Fixed manual ordering in the cycles view
- Fixed a crash when creating an issue in a multi-team view
- Prevented unnecessary scroll bars from images on the Linear Method pages
- We now show an error message when dragging a non-draggable list item
- Fixed a crash when searching in and navigating to an empty list
- An unnecessary scroll bar no longer shows up on estimate settings
- The "No estimate" issue filter can now be activated in the command menu
- The "Reference another issue" action no longer shows in the command menu for unsaved issues
- The default issue template will no longer override drafted issue descriptions when you open the full page issue editor
- Reduced the time it takes to load Linear from scratch by about 25%
- Fix to prevent keyboard focus on hidden elements when in issue view
- Admins can now change a suspended user's username
- The keyboard shortcut to attach files ⌘⇧A when creating an issue or comment can now be triggered in more situations
- We no longer register the new window shortcut CtrlN as a global shortcut in the Windows app
- Fixed the alignment of the status icon when creating a sub-issue
- Added more icons to pick from for Projects and Views
- Updated icons in the contextual menu for projects
Private teams & migration assistant

Private teams
As your company grows, you'll likely need to restrict access to a portion of your issues. For example, one team might be working on something that is supposed to be a surprise to the rest of the company, or the team might be forced to sign NDAs with an integration partner and keep details of their work hidden even from the rest of the company.
Whatever your reason to hide some issues from the rest of the workspace, you can now create private teams and have more fine-grained control over who can join the team.
When you create a private team or make an existing team private, you become the owner of the team. Only the team owner and workspace admins can invite users to private teams, and only active team members can see issues in a private team. To control access, we have a new members section under team settings.
Migration Assistant
A couple of months ago, we launched importers in preview, allowing you to quickly import your issues, labels, projects, epics, and more from Jira, GitHub, Asana, and Clubhouse directly into your Linear workspace. Since then, we have continued to improve the importing experience. You can now customize how you would like to import issues and team members, as well as see a preview of what data will be imported with the new migration assistant.
If you are an admin, visit your workspace's import settings to get started.
Fixes and improvements
- Updated supported browsers. We now target modern browsers to improve Javascript loading performance
- Fixed keyboard shortcut conflict (Ctrln) with new Windows application
- Fixed image loading issues as part of new user onboarding
- Fixes race condition when creating a new team and choosing to copy properties from a team that is subsequently deleted
- Fixed a case where attaching/detaching a parent issue would cause the issue to not be saved
- Fixed layout issues in the emoji picker
- Fixed a rare situation where a custom view preference could crash the client
- Moving issue between teams now correctly resets its status
- Improved styling of radio buttons for dark themes
- Improvements to list rendering performance
- We now clear multi-selection when pressing Tab in a list
- Improved list of notification settings to clarify different options
- Pull requests and external issue attachments are now shown as part of archived issues
- Fixes to issue estimates in custom views
- Jira importer now correctly imports the Jira issue type as a label
- Jira importer now imports correct issue backlinks for imported issues
Startup performance improvements

Startup performance improvements
Speed is a feature. While we try to pay attention to performance when adding new functionality, regressions and unoptimized codepaths do happen. Now and then, we look at critical aspects of the application and refactor, or re-architect portions of our tech stack to become more performant.
This time around, we took a look at startup performance for pre-warmed clients. With pre-warmed, we mean clients that spin up for a subsequent time and thus already have all the workspace data stored in the local database. Pre-warmed startups account for most sessions, making it a great candidate for us to sink our teeth into.
We concentrated our efforts around the following:
- Refactoring and optimizing how we load up data at startup
- Switching from Parcel to Rollup as our build system to improve bundle size
- Lazy loading parts of the application and data that are used infrequently
This resulted in a big improvement in startup performance and memory consumption, especially on Safari and other browsers and our desktop applications. On our own workspace, which has around 4000 issues and hundreds of projects, we saw the following improvements:
Startup time to show active issues
- 59% faster on Safari
- 40-50% faster on other browsers and desktop app
Startup time to show a huge backlog
- 82% faster on Safari
- 60-65% faster on other browsers and desktop app
Memory usage
- 70-80% more efficient across all browsers and desktop apps
Bundle size improvements
We have improved code bundling by targeting only modern browsers, better dead code elimination, and code splitting. We've also made sure to preload code before it's needed. This means we load around 50% less code (30% when compressed). This results in ~10-30% faster page load times from a cold cache, depending on network speed.
Fixes and improvements
- File uploads can now be canceled
- Fixed ability to copy issue URL and ID when the issue is archived
- Fixed a problem where multiple notification emails might have been sent to users
- Added ability to revert to previous versions of issue descriptions. To use it, go to the issue edit screen and choose "Revert issue description" in the command menu.
- When there are no notifications in the inbox, the Notifications drop-down button is no longer visible
- Moving an issue to a different team now adheres to that team's "Active issues are required to belong to a cycle" setting
- Cycles can now be 5 or 7 weeks long
- Whether you create a new template or edit an existing one, you will now be redirected back to the page where you started the template action
- When the search input is focused on small screens, the sidebar is also opened
- API: Fixing a bug with imageUploadFromUrl not working when the source URL contained special characters or a query string
Keyboard shortcuts help

Keyboard shortcuts help
Keyboard shortcuts are frequently used and loved by our power users. They let you control all of the common (and much of the less common) functionality of Linear and make the application a lot faster to use. To get more users using keyboard shortcuts, we've redesigned our keyboard shortcuts help screen and made it searchable. You can press?to bring up the help window, or you can press the Help & Feedback section at the bottom of your sidebar and then select Keyboard shortcuts.
Fixes and improvements
- Months are now abbreviated mo instead of m, which is reserved for minutes
- Linear is now installable as a PWA on desktop Chrome
- Existing labels are now removed when an issue template is applied
- All workspace admins are now able to view and edit OAuth applications
- Fixed the unhelpful error message for invalid callback URLs for OAuth applications
- Fixed a bug with the Asana importer if you are importing issues that belong to multiple Asana projects
- You can now set your team's board view or a custom view as your default view
- Fixed the unsubscribe link for plaintext notification reminder emails
- Fixed editor panel contrast in new issue editor
- Fixed an infrequent crash in list views
- Fixed a crash that could happen when uploading files in issues.
- Fixes a few issues related to multi-select actions
- Small improvements to button styling
Apple M1 & Windows support

Apple M1 & Windows desktop apps
We've updated our desktop applications to support both Apple's latest M1 chips and Windows. Downloading the M1 binary will let you run Linear's macOS desktop application without emulation, making the app run faster. To update your existing macOS application, or to download for Windows, head over to linear.app/download.
Workspace settings overview
We've added a new section to the workspace settings to give you an overview of what features and integrations you've enabled for your workspace. The overview page also contains links to documentation for each of these features and integrations.
Fixes and improvements
- Importing image attachments or adding links to other attachments with the Asana importer
- Improvements to scrollbar styling
- Added filtering by numeric shortcuts to command menu with numbered options (e.g., Open team)
- Board navigation shortcuts will no longer trigger when you are viewing an image
- You can now attach files when editing comments by clicking on the attachment icon rather than only dragging and dropping files
- The drop target for files in the issue creator is now larger
- Fixed a bug causing some issues with linked pull requests not to be viewable
- Fixed a bug which caused Clubhouse imports for projects with a large number of stories to fail
- Fixed the issue creator not closing when the mouse leaves the modal window during selection
- Fixed incorrect grouping when hiding completed issues
- Fixed selecting items by pressing space in the action menu
- Fixed state filter for grouped views
- Fixed Github integration to correctly connect a PR under certain circumstances