🐞 High CPU load on lsd and pkd processes when CodeEdit is open
Description
High CPU load of lsd and pkd when running CodeEdit.
To Reproduce
Install published version of CodeEdit
- Start Codedit
- Open Activity Monitor
- Search for "lsd" or "pkd" and see high usage
Expected Behavior
Normal CPU load
Version Information
CodeEdit: 0.0.3 macOS: 13.2.1 Xcode: 14.3
Can you elaborate a bit more? This is too little information to do something with.
Maybe screenshots from Activity Monitor or profiler data from Xcode?
lsd and pkg are responsible for loading plugins. Can there be a problem with CodeEdit?
Sure, but I'm not seeing "proof" of your claim? Where do you get your claims from.
Also, you haven't set an issue title.
Please be more specific. Closing this issue because it is pretty vague.
@austincondiff I can confirm this issue also happens on my machine. Right when I open the app, lsd and pkd eats up around 40 - 50%, sometime even spikes to over 100%. Both of these goes away when I exit.
Our weather is quite hot right now in the summer, and because I'm using a Macbook Air M1 (16/256), this causes my laptop to get quite hot, even when doing nothing until I close it.
I am using Sublime Text now.
Not sure why this is closed. I noticed high pkd and led usage on my computer and was searching for an answer. I came across this, and realised I had CodeEdit installed. This is definitely still an issue and I have uninstalled the software. You should open this ticket back up.
Proof?
Open CodeEdit, have two open documents with some text in them. Now go and open activity monitor: pkd and lsd processes sit around 30% (on M1 Max). Close CodeEdit, pkd and lsd go to 0. There you go...
No idea why your software causes issues with PluginKit but it does.
Just noticing the comments, thanks for posting. I'll open it back up.
Note that we're in active development and that this is NOT a finished product.
That said, it seems that this issue is not occurring when ran directly from Xcode. (At least "not on my machine")
(The reason this was closed is because there was not much info posted before)
Before opening CodeEdit:
With CodeEdit open:
After closing CodeEdit:
Before opening CodeEdit:
Versions: CodeEdit: 0.0.3-alpha.36,5650b45 (current version on brew) Mac: MBA 2018 MacOS: Sonoma 14.0
Hope this is of use to you. I haven't installed Xcode and don't really know how XCode's profiler works, but if there are other ways to help, let me know.
Same issue for me as well. Let me know what type of profiling you want so I can record it and send it over.
Versions: CodeEdit: 0.0.3-alpha (36) macOS: Ventura 13.6.1
I think there are enough comments that show us that something is wrong here. We just have had our latest release to 0.0.3-alpha-37, which brings some huge changes, it could be that it is fixed. If not, we need to debug further in Xcode I think. Hopefully it will give us more insight.
@TomDev234 mentioned in this issue that "lsd and pkd are responsible for loading plugins". I do not know what kind of plugins we are talking about here, but we do not load plugins purposefully so to say. It could be that some library, that we use, does that. We'd have to look into it
I can confirm it still happens on 0.0.3-alpha-37
Can confirm as well. It's unfortunate for a really nice UI code editor like this...
@BienGudBoy We are in pre-alpha so bugs like this are to be expected. We’ll definitely fix this one soon enough.
@austincondiff The problem is with the OpenWithCodeEdit appex. I kept seeing a bunch of these in the system logs:
rejecting; Ignoring mis-configured plugin at [/Applications/CodeEdit.app/Contents/PlugIns/OpenWithCodeEdit.appex]: plug-ins must be sandboxed
It seems like pluginkit keeps trying to reinstall the plugin, so deleting it solves the problem. I suggest re-uploading alpha-37 without the plugin, just until the problem is solved. A warning would also do, because I don't think this happens on every machine.
@johnothwolo Thanks for the info! Will test this out myself and we'll discuss this in the next meeting
I found the same problem. Even I don't run CodeEdit, just installed it.
lsd and pkd user process will make high CPU utilization.
After I remove all files about CodeEdit(uninstall), this two process became normal.
Test on my MacBook Pro M1 Pro
before uninstall, CPU util: above 20%
after uninstall CPU util: below 10%