Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Atom editor running slowly in all new projects

Tags:

atom-editor

Has anyone had issues recently with Atom slowing down? Mine has become unusably slow, but only for projects that I've created in the last few days. I can edit older projects with no issue, however there's a 5 - 10 second lag when typing and navigating between files in all new projects. The Activity Monitor shows that Atom Helper is often using 100% CPU.

Steps so far:

  • Uninstalling and reinstalling Atom
  • Testing whether opening projects using different languages (Ruby vs Javascript) makes any difference (it doesn't)

Other notes:

  • I have the most recent version of Atom installed (1.18.0) I've been using Atom for a month without issues
  • I haven't changed any of the settings or packages or plugins
  • The first project affected was one using Javascript and Jasmine for testing (all previous projects were in Ruby using Rspec)
like image 216
Alison Woodman Avatar asked Aug 02 '17 13:08

Alison Woodman


People also ask

Why is Atom IDE so slow?

Even worse, it's written in CoffeeScript (which means the source code has to be translated into JavaScript before running). It's interpreted, which is always slower that compiled. Atom is sloppy, at best.

Is Atom editor heavy?

Atom being the heaviest in size, it becomes difficult to work with heavy files. There occurs some lag and slowness in the Atom editor while editing heavy files.

Is Atom still slow?

When I first started using Atom, it was fast and as I mentioned lightweight. However, when you compare it to VS Code, it's load time can be pretty slow. Especially if you're opening somewhat large or long files. Atom can get pretty laggy and the wait becomes annoying.

How do I reset Atom editor?

Press CTRL-ALT-X in the workspace to restart Atom.


2 Answers

Your issue is probably related to a certain package/s that is taking up a lot of your processing. I recently had a problem where atom would freeze/lag every 20-30s. I would be typing, and it would just freeze, and then about 5-10s later every letter I had pressed would appear. I ended up basically trying a few different things, and eventually ruled out my problem.

I started off by trying to run:

atom --safe 

This command runs atom without the community packages. It is used to troubleshoot if your problem is a community package or an atom package. While running in safe mode see if your problem persists. If it does, it is not a community package.

After I ruled out community packages I basically went through atom's packages trying to narrow down the source of my problem. I would disable 10-20 packages at a time, and then try to reproduce my issue. After doing this 3-4 times, my issue stopped. Eventually I found the buggy package and was able to disable it. My issue immediately stopped.

Atom debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/

Note: Make sure atom is up to date with the latest safe build. You could also try completely removing atom from your machine and then reinstalling it.

Note: You should also consider that it could be your machine. I recently upgraded from my 2012 MacBook Pro HDD to a Samsung Evo 850 SDD. I was trying to develop a react-native app, and the simulator was painfully slow to where I couldn't do anything. Upgrading the hard drive fixed this problem. (Also since upgrading, atom is much faster.)

like image 101
BenBrewerBowman Avatar answered Oct 17 '22 18:10

BenBrewerBowman


I was having similar issues with lag because I accidentally initialized a GitHub repo on my desktop (Mac OS 10.13).

Whenever I opened a project with many files, the lag would increase. The constant change of file names from grey to green was a clue, I was working on a personal project that was not supposed to be linked to Github so that should not have been happening.

Eventually, I stumbled upon the following link, which helped solve the problem.

How to remove git repository created on desktop

Remove the .git file from your desktop

  1. In the main bar navigate to Go -> Home

  2. View hidden files using the shortcut SHIFT + COMMAND + PERIOD (.)

  3. Find and delete the file ".git"

A Word of Warning

Do not do this if your desktop is your active Github repository.

For me, I accidentally made my desktop a repository when I started using Github. It is easy to make the mistake of initializing a git repo from the wrong folder, so this may have happened to you as well.

like image 1
callpete Avatar answered Oct 17 '22 16:10

callpete