Hackerpilot / textadept-d

D language plugin for Textadept
MIT License
13 stars 3 forks source link

CPU at 100% whenever I load a D file #6

Closed schveiguy closed 8 years ago

schveiguy commented 9 years ago

Whenever I load a D file, textadept goes to 100% cpu usage (100% of one core).

If I close the D file, the CPU stays at 100%.

If I close textadept completely, and restart with no D files open, it goes back to reasonable levels.

schveiguy commented 9 years ago

May be Mac only, let me know if you want me to try anything.

Hackerpilot commented 9 years ago

It didn't do this when I was helping you with the setup at DConf, right?

schveiguy commented 9 years ago

I'm not sure, I wasn't paying attention to the CPU monitor. I just noticed my mac was hot and was surprised to see Textadept as the culprit. Then I tried opening non-D files and found the results posted above.

I haven't changed anything since dconf.

schveiguy commented 9 years ago

I've narrowed it down to this:

  1. If I have dcd-server running already when I run textadept and open a D file, CPU usage is normal
  2. If I do not have dcd-server running when I run textadept and open a D file, CPU usage = 100%.

Once I open the first D file, it either gets stuck at 100% or not. If I have run the dcd-server separately, and then I kill it after opening the file, it seems not to run dcd-server, and it does not use 100% CPU. So it seems to be directly tied to textadept running dcd-server.

schveiguy commented 9 years ago

Definitely has to do with spawn. If I comment out the line that spawns, no pinned CPU.

I tried removing optional parameters that handle stdout/stderr. Still pins CPU.

schveiguy commented 9 years ago

I have a workaround in place -- path to start server is a shell script that starts dcd-server in background and exits :) I have a feeling this is a textadept/lua issue. I'm not motivated to make a full workaround that would determine if it should kill dcd-server on exit based on some sort of output from shell script. It's OK if dcd-server keeps running, or maybe I'll kill it always :)

Hackerpilot commented 9 years ago

Something tells me that not many people use Textadept on the Mac.

bitraft commented 8 years ago

I try use Textadept on Mac, It is the only Lightweight IDE for D I can find.

when open a file and try the AutoComplete the IDE will freeze. and I has to force quite the dcd-server created by Textadept.

I use same dcd config with IntelliJ IDEA work well.

Hackerpilot commented 8 years ago

http://foicica.com/lists/code/201601/2882.html

Can either of you test a nightly (or 8.6, when it's released eventually) build of Textadept to see if this issue is fixed?

Hackerpilot commented 8 years ago

http://foicica.com/textadept/download/textadept_NIGHTLY.osx.zip

schveiguy commented 8 years ago

Hm... I stopped using TextAdept a while ago, because I couldn't handle the lack of cindent that vim gives me.

Hackerpilot commented 8 years ago

Nobody has responded to this for several months, so I'm going to close it.

triplejam commented 5 years ago

Problem still exists in 10.0 alpha 3

Edit: Or I should say when the completion list first appears, not loading the file.