T3S icon indicating copy to clipboard operation
T3S copied to clipboard

VERY high CPU usage

Open nathggns opened this issue 10 years ago • 13 comments

I've discovered very high CPU usage from this plugin even when not editing and when error on save is enabled.

I know that it is being cause by this plugin, as killing the process breaks the plugin. Is there anything I can do about this?

nathggns avatar Apr 01 '14 23:04 nathggns

Hello,

On my windows machine the most expensive node operation goes up 25% of UC for few seconds the time the action take and never stays at such high percentage.

  1. Does this happen all the time ?
  2. Is the CPU usage directly at this percentage from the get go or does it build over time ?
  3. Do you have errors related to the plugin on the SublimeText console ?

Railk avatar Apr 02 '14 08:04 Railk

I have this issue a lot, node.exe instances (sometimes up to 4/5) seem to linger around and never close. Normally with 100% CPU on a single core and high memory usage (up to 300MB)

lucas-jones avatar Apr 02 '14 09:04 lucas-jones

If you can provide answer for 3 also it can help me pinpoint the origin of the problem. I'll look on my OSX vm, when i can, to see if i can reproduce this problem.

Railk avatar Apr 02 '14 09:04 Railk

This happens almost all of the time. It doesn't go up over time, it jumps straight to 100%. Also, there are no errors.

nathggns avatar Apr 03 '14 20:04 nathggns

I also experience the same problem. FWIW, I just opened 2 different *.ts files and I noticed 4 Node.js instances running: image

While I really love this package, the high CPU consumption is really annoying.

moodmosaic avatar Apr 04 '14 21:04 moodmosaic

I think, a new Node.js instance runs for each newly opened .ts file. (Hope that helps.)

moodmosaic avatar Apr 04 '14 21:04 moodmosaic

Hello moodmosaic,

I you have multiple ts file related to each other (a project) you need to setup a project as stated in the readme file otherwise you will have two nodejs instance per file instead of two node instance for an entire project.

Here the problem is related to one of the instance of nodejs (the error highlighting one) taking 100% of cpu.

Railk avatar Apr 04 '14 21:04 Railk

I have a *.sublime-project file with the following contents:

{
     "settings":
    {
        "typescript":
        [
            "app/scripts/_all.ts",
            "test/spec/_all.ts"
        ]
    }
}

Both paths for the root files _all.ts are correct. However, a new Node.js instance is created for each .ts file.

I am using the master branch. Please, let me know if I should open a new issue. I am sure I am missing something though :$

moodmosaic avatar Apr 04 '14 22:04 moodmosaic

I think you are missing the toplevel folder name in the paths.

Railk avatar Apr 04 '14 22:04 Railk

:+1: That was it!

moodmosaic avatar Apr 05 '14 08:04 moodmosaic

Ok great :)just a question what would have made you understand better that you needed to include this folder in the path ?

Railk avatar Apr 05 '14 10:04 Railk

TBH, I think it could be a little higher in the readme - but perhaps it's probably just me :)

moodmosaic avatar Apr 06 '14 12:04 moodmosaic

@nathggns

I've tested on a macbook pro and yes it's going higher than windows(the cpu usage goes up to 60% but never stay up yo this level and go back to 0% quite fast). Sadly for now i cannot do much things right now, errors calculations takes some cpu, I've change the errors calculation delay, so that less calls are made but the best choice is to only show errors when saving, if cpu usage is really too high.

Railk avatar Apr 27 '14 16:04 Railk