Coder Social home page Coder Social logo

Delay after saving about atom-wakatime HOT 6 CLOSED

wakatime avatar wakatime commented on May 22, 2024
Delay after saving

from atom-wakatime.

Comments (6)

alanhamlett avatar alanhamlett commented on May 22, 2024

This is on Windows, Mac, or Linux?

The two places which could cause slowness are:

  1. finding the current project by looping over all projects
  2. executing wakatime-cli in a background python process

How many project folders do you have open in Atom?

Executing wakatime-cli happens async, but maybe Atom somehow blocks other onDidSave events from executing.

from atom-wakatime.

daveyjones avatar daveyjones commented on May 22, 2024

I'm on a MacBook Pro running OS X 10.11.3. I only have 4 projects, so it's probably not 1. It seems like a conflict with onDidSave is more likely. The LESS compiler I'm using is less-autocompile. I haven't quite figured out exactly how to re-produce. I'm able to resolve the issue temporarily by resetting the wakatime plugin, but after a time the delay returns. I'll try to figure out the exact path to reproduce.

from atom-wakatime.

daveyjones avatar daveyjones commented on May 22, 2024

I think this may be related to #31. After each save, the CPU usage for Atom Helper is quite high (see screenshot). I wonder if Atom is waiting for this process to finish before executing other onDidSave events due to the high CPU usage. (I'm not sure if Atom is that smart.)

screen shot 2016-04-01 at 9 06 14 am

from atom-wakatime.

alanhamlett avatar alanhamlett commented on May 22, 2024

I can try using BufferedProcess instead of child_process.execFile but the former is just a wrapper of the latter using spawn instead of execFile so I'm not sure it would make any difference.

With wakatime installed but less-autocompile plugin uninstalled, does Atom Helper still use such high CPU?

I'm not able to reproduce it with less-autocompile installed, but my LESS files don't have the custom out, sourcemap, ... parameters on the first line of the LESS file.

from atom-wakatime.

daveyjones avatar daveyjones commented on May 22, 2024

I'm actually going to close this issue. I don't think it's related to WakaTime at all. I've read that others are having issues with Atom Helper and high CPU usage. One suggestion I found was to disable the built-in spell-check package. This seems to have solved it for me.

from atom-wakatime.

alanhamlett avatar alanhamlett commented on May 22, 2024

Oh that's a relief, I was stuck on this one. 😌

from atom-wakatime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.