pulsar
pulsar copied to clipboard
CPU usage high after a few hours
Thanks in advance for your bug report!
- [X] Have you reproduced issue in safe mode?
- [X] Have you used the debugging guide to try to resolve the issue?
- [X] Have you checked our FAQs to make sure your question isn't answered there?
- [X] Have you checked to make sure your issue does not already exist?
- [X] Have you checked you are on the latest release of Pulsar?
What happened?
After several hours (maybe a day or two) pulsar uses a lot of cpu when idle. Maybe related to putting the laptop to sleep.
Macbook Pro intel
I have not tried it in safe mode because it takes at least a day of normal usage.
Pulsar version
1.102.2023021606
Which OS does this happen on?
🍎 macOS
OS details
Mac OS Monterey 12.6.2
Which CPU architecture are you running this on?
64-bit(x86_64)
What steps are needed to reproduce this?
Keep Pulsar running for more than 1 day. Use the computer normally. Close the laptop and let it go to sleep a few times. Observe that the cpu usage is high and the laptop is using battery faster than usual. Look at Activity Monitor and observe that "Pulsar Helper (Renderer) uses 85% cpu.

Additional Information:
No response
Does seem like a lot. But does seem very hard to recreate and pin down what the issue is. If there's any performance measures you can get in DevTools or extra logging that'd be very appreciated, but thanks for your contribution!
The issue comes back consistently for me after 2 days without restarting the app (laptop goes to sleep). I did some profiling with the issue and without, and when issue is ongoing I see a lot of small spikes of activity, whereas after a restart there no such spikes and the app is very quiet. I highlighted a couple of those spikes in the following screenshots, and the time seems to be spent on Composite Layers or Update Layers Tree. One of the spikes showed linter-ui-default in the stack for a small portion of the time, so probably not related, I'm going to try and disable it for now and see if the issue still occurs.


Let me know if you want me to drill into more details or run a different experiment.
看起来确实很多。但似乎很难重新创建和确定问题所在。如果您可以在 DevTools 或额外的日志记录中获得任何性能度量,我们将不胜感激,但感谢您的贡献!
I think it's a stubborn problem. This also exists on Atom The fan was loud
I'm also MacOS (14.1.1) experiencing very high CPU use of the Pulsar Helper (Renderer) process. When I inspect the open files in Activity Monitor I can see that Pulsar Helper (Renderer) is slowly opening and doing some process on many random files in my home directory unrelated to Pulsar (e.g. within ~/Library/Cache/ ~/Pictures etc). This only occurs when I have a file open but is unrelated to the location of the file. What on earth is going on? Making my computer hot and I'm a bit concerned Pulsar is accessing so many unrelated files. Also, I just checked and this behaviour is experienced in Atom 1.60 as well.
@sebachu As for ~/Library/Cache I'd probably assume that's the Electron process accessing it's cache files.
As for ~/Pictures I'd have no idea what's causing that. As far as I know there's nothing within Pulsar that ever searches pictures in any way, so maybe this is somehow the fault of Electron, NodeJS, Chromium, or a community package.
I'm curious though if you run any browser based on Chromium if you see the same thing, as that feels like the only likely candidate, although I'm really not sure.
Although I am rather curious of the root cause of this issue. The only thing I can think of is that after Pulsar is run for a while it activates many packages that wouldn't otherwise be activated during boot, causing increased memory usage, or if this is somehow related to timers in the background.
@Titousensei if possible, if the issue reappears for you, would you be able to export that Profiler so that it can be inspected further by us? It'd be awesome to at least get some idea of what's going on, and knowing the platform we could then begin to attempt getting a baseline.
@confused-Techie @Titousensei Thanks so much for your response and help.
I've done a bit more digging: Issue exists on Pulsar 1.111.0 with every plugin disabled (community and core). I am running MacOS Sonoma 14.1.1.
Bug can be easily reproduced (by me) this way:
- On initial launching of Pulsar (all plugins disabled) the Pulsar Helper (Renderer) process has a static list of open files (I am using Activity Monitor - Open Files and Ports to observe this). CPU usage is minimal.
- I open a project folder within my home directory which contains a single file (~/projects).
- I can observe high CPU usage of Pulsar Helper (Renderer) process (50%-100%)
- there is a continual opening of new files unrelated to the project (e.g. Steam library, Firefox cache, mail files, and other random files under ~/Library ~/Application Support ~/Steam ~/Pictures ~/Downloads and so on).
- this only occurs when the editing window is foregrounded in the window manager.
- For example - below is an extract from the open files of the Pulsar Helper (Renderer) process. The document "markdown cheatsheet.md" is the only file I had open in Pulsar, but it has also opened up part of my Photo library for some reason. These open files continually change every second or so - causing high CPU usage.
Can anyone confirm this is also happening on their MacOS system?
->0x85b7ddcd033460d2 ->0x34cfaa953675818b /Applications/Pulsar.app/Contents/Resources/app.asar count=0, state=0xa /Users/bastian/.pulsar/keymap.cson /dev/null /Users/bastian/projects/Markdown Cheatsheet.md /Users/bastian/.pulsar/styles.less /Users count=0, state=0x8 /Users/bastian/projects /Users/bastian /System/Volumes/Data /Users/bastian/Pictures/Photos Library.photoslibrary/resources/derivatives/0 /System/Volumes /System count=0, state=0x8
This is a fascinating find.
I took quite a bit of time looking into this the other day, and while there may be what assumed as unrelated file handlers on Windows, I think things are totally fine there.
After some investigating, on Windows there were many files with handlers attached such as:
- Pulsar config folder
- Pulsar source
- Project Directory
- Font files
- Electron Cache
- Temp directories
But nothing looks strange there. So I almost wonder if this is a macOS only issue. But thanks a ton for confirming and testing this behavior confirming that this isn't an issue with any packages. Meaning it has to be something within core, or more likely something within Electron/NodeJS/Chromium.
I'd be interested what you find when testing this same behavior against other Electron apps. For example if you see similar file handlers in some of the following:
- VSCode
- Bitwarden
- Discord
- GitHub Desktop
All of those are other Electron based apps, but some have much more up to date versions of Electron than we do, so not a perfect comparison, but still may be worth checking.
Thanks a ton for getting back to me with more helpful info
Circling back to this issue after a lot of experimentation. I think my issue was cause by a git plugin. I observed that the high cpu usage was happening shortly after I did a few git checkout and git rebase in the terminal, while having some of those files open in pulsar.
When the cpu is high, there's 2 processes using >100% CPU: pulsar and com.paloaltonetwork.traps.securityextension. I cannot disable the second one, but if I close pulsar the cpu goes back to near zero. I think those two processes are fighting to examine those files that have changed because of my git commands.
So I disabled all my git plugins in pulsar (which were nice but not really of use to me), and I haven't seen the high CPU usage issue for several days. I did not experiment to find if this caused by one particular plugin or if all of them use the same pulsar API and that's the root cause.
I'm torn on whether this is going to end up being a legit bug on Pulsar or the github package. @Titousensei, I think you've probably identified the core conflict, but I'm not clear on why those two processes would need to fight — because neither one of them would need to change any files, just read files that are already on disk. In theory, they'd only fight if one tried to monopolize access or if one was applying an effect that the other one kept undoing.
In general, I am inherently distrustful of security software on macOS, based on my lived experience. github is a complex package and nobody on the current team has deep knowledge of it, but it does use dugite, the same git bindings used by GitHub Desktop, so I'd be surprised if it were doing anything that wouldn't also manifest in GitHub Desktop or other Electron apps.
@DeeDeeG, do you think there's any chance that this problem could be fixed by bumping dugite, the way we attempted to do a couple months back?
@DeeDeeG, do you think there's any chance that this problem could be fixed by bumping dugite, the way we attempted to do a couple months back?
Worth a shot, and I was thinking of bumping it just for the ARM Linux compatibility alone, so yeah, "why not?" I guess.