# High CPU usage while scrolling

**URL:** <https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498>\
**Category:** Support\
**Created:** [29 January 2020 10:27 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498 "2020-01-29T10:27:11Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![s4rc1na](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/s4rc1na/32/131_2.png) [@s4rc1na](https://discourse.joplinapp.org/u/s4rc1na)\
**Post date:** [29 January 2020 10:27 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/1 "2020-01-29T10:27:11Z")

</div>

Running `Joplin-1.0.179.AppImage` on `Manjaro Linux 18.1.5, KDE` (which I don’t think is relevant to this issue I’m reporting).

I observed that I get high CPU usage when I’m scrolling through note even when the layout is suppose to show the source (no rendering markdown to html):

 ![Peek 2020-01-29 12-00](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/e/e72908c0e0bd85ad31072741e5eeb9f6e83615ac.gif)

As you can see in the screen-capture, joplin is not syncing or anything else other than scrolling through the text.

---

<div class="post-metadata">

**Author:** ![mic704b](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@mic704b](https://discourse.joplinapp.org/u/mic704b)\
**Post date:** [29 January 2020 10:59 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/2 "2020-01-29T10:59:57Z")

</div>

What browser do you use? Do you get the same problem with it?

I suspect it may not be specific problem to Joplin or Linux.

BTW I see the same on Ubuntu.

---

<div class="post-metadata">

**Author:** ![bedwardly-down](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/bedwardly-down/32/3236_2.png) [@bedwardly-down](https://discourse.joplinapp.org/u/bedwardly-down)\
**Post date:** [29 January 2020 18:00 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/3 "2020-01-29T18:00:39Z")

</div>

Honestly, that might be because of how Electron renders content. That CPU usage isn’t super high but I don’t think Joplin uses hardware accelerated rendering from the GPU like some apps are starting to now. I do know that there was a new renderer released for mobile platforms pretty recently but I’m not sure if it affects Desktop or not.

---

<div class="post-metadata">

**Author:** ![kartoo](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kartoo/32/324_2.png) [@kartoo](https://discourse.joplinapp.org/u/kartoo)\
**Post date:** [29 January 2020 19:41 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/4 "2020-01-29T19:41:45Z")

</div>

I can confirm this on Debian Testing, Joplin cpu use is between %65 to %80 during scrolling.

---

<div class="post-metadata">

**Author:** ![s4rc1na](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/s4rc1na/32/131_2.png) [@s4rc1na](https://discourse.joplinapp.org/u/s4rc1na)\
**Post date:** [30 January 2020 09:22 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/5 "2020-01-30T09:22:50Z")

</div>

I use Firefox 72.0.2 (64-bit), but I cannot easily confirm that since I have tons of tabs open and some extensions as well, so the situation between the two softwares (Joplin and Firefox) are not similar. Regardless I tested it and on an HTML that was produced based on RMarkdown (some images and text, but no crazy ajax or background JS), I get about 68% cpu usage for each thread.

---

<div class="post-metadata">

**Author:** ![s4rc1na](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/s4rc1na/32/131_2.png) [@s4rc1na](https://discourse.joplinapp.org/u/s4rc1na)\
**Post date:** [30 January 2020 09:25 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/6 "2020-01-30T09:25:47Z")

</div>

Well, it depends on what is your threshold for "super high", but based on the hardware I have, a good portion of my CPU power goes to scrolling in a plain text of one app (you can see it on the screenshot as well), meaning that I cannot have other softwares running smoothly if they need some good CPU power.

This is my CPU model:

> Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz

---

<div class="post-metadata">

**Author:** ![bedwardly-down](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/bedwardly-down/32/3236_2.png) [@bedwardly-down](https://discourse.joplinapp.org/u/bedwardly-down)\
**Post date:** [30 January 2020 09:28 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/7 "2020-01-30T09:28:14Z")

</div>

I was going by what the gif showed. It didn't go above 55% or so but for my system, that would be more like 80% in that context. Haha

Old i2 here. 😆

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [30 January 2020 11:51 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/8 "2020-01-30T11:51:55Z")

</div>

At application level, not much is happening when scrolling, and I’m not seeing this on macOS for instance, so it’s possible it’s some Linux and/or Electron issue.

---

<div class="post-metadata">

**Author:** ![s4rc1na](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/s4rc1na/32/131_2.png) [@s4rc1na](https://discourse.joplinapp.org/u/s4rc1na)\
**Post date:** [30 January 2020 13:21 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/9 "2020-01-30T13:21:01Z")

</div>

I watched the GIF I posted and I though it worth mentioning that:

1. The software I used to record ([peek](https://github.com/phw/peek)) the screen also use CPU a lot, so the barplots you see at the top part of terminal are mostly dominated by that software
2. in the [`htop`](https://linux.die.net/man/1/htop) command, I’ve filtered joplin, meaning it only shows processes that have “joplin” in their names/commands.
3. the table is sorted by CPU usage in decreasing order

So just pay attention to the table and the first three rows.

---

<div class="post-metadata">

**Author:** ![s4rc1na](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/s4rc1na/32/131_2.png) [@s4rc1na](https://discourse.joplinapp.org/u/s4rc1na)\
**Post date:** [30 January 2020 13:22 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/10 "2020-01-30T13:22:39Z")

</div>

> [@laurent](#):
>
> so it’s possible it’s some Linux and/or Electron issue.

What would be your suggestion to be done? Is there any way to report this to correct channels (Electron or AppImage or ...)?

---

<div class="post-metadata">

**Author:** ![bedwardly-down](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/bedwardly-down/32/3236_2.png) [@bedwardly-down](https://discourse.joplinapp.org/u/bedwardly-down)\
**Post date:** [30 January 2020 13:47 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/11 "2020-01-30T13:47:06Z")

</div>

> [@s4rc1na](#):
>
> What would be your suggestion to be done? Is there any way to report this to correct channels (Electron or AppImage or …)?

I'd post in the official issue tracker for Electron for starters. Below is a link to all current open issues related to CPU and Linux but there may be closed ones related too.

> **[Issues · electron/electron](https://github.com/electron/electron/issues?utf8=%E2%9C%93&q=is%3Aissue%2Bis%3Aopen%2Bcpu%2Blinux)**
>
> :electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS - Issues · electron/electron

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [30 January 2020 15:18 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/12 "2020-01-30T15:18:12Z")

</div>

Indeed it doesn’t harm to try to post on the Electron bug tracker, but I wouldn’t be very hopeful it would be fixed as they would need a minimum example to test with. As it is, they can simply assume it’s an issue with Joplin (which I don’t think it is but it’s hard to be 100% sure) and in any case, it’s unlikely they’ll try to build Joplin just to test this.

With a bit of luck it’s one of those performance issue that gets resolved in a future version though. I remember not long ago that they are making some changes to better use the multi-process architecture of Chromium so that could help.

---

<div class="post-metadata">

**Author:** ![bedwardly-down](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/bedwardly-down/32/3236_2.png) [@bedwardly-down](https://discourse.joplinapp.org/u/bedwardly-down)\
**Post date:** [30 January 2020 15:22 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/13 "2020-01-30T15:22:50Z")

</div>

> [@laurent](#):
>
> With a bit of luck it’s one of those performance issue that gets resolved in a future version though. I remember not long ago that they are making some changes to better use the multi-process architecture of Chromium so that could help.

Just like with many other libraries, though, Electron and Chromium are both a bit slow on fixing bugs on and pushing updates to the Linux platform.

---

<div class="post-metadata">

**Author:** ![s4rc1na](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/s4rc1na/32/131_2.png) [@s4rc1na](https://discourse.joplinapp.org/u/s4rc1na)\
**Post date:** [20 March 2020 09:20 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/14 "2020-03-20T09:20:06Z")

</div>

The issue persist in 1.0.193

I don’t know what is the best way to report (the posts here cannot be edited later). I thought it would be productive and informative if I report if the situation is resolved in every release of Joplin. But at the same time I do not want to spam everyone. I’m all ears if you:

1. know a better way to report this
2. think that there is no point in such reporting

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [20 March 2020 09:50 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/15 "2020-03-20T09:50:01Z")

</div>

As this is most likely an Electron issue, the latest versions indeed won’t change much since we didn’t upgrade Electron yet. We’ll probably do it at some point in the coming months and hopefully it will fix the issue.

---

<div class="post-metadata">

**Author:** ![s4rc1na](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/s4rc1na/32/131_2.png) [@s4rc1na](https://discourse.joplinapp.org/u/s4rc1na)\
**Post date:** [25 May 2020 15:31 UTC](https://discourse.joplinapp.org/t/high-cpu-usage-while-scrolling/5498/16 "2020-05-25T15:31:37Z")

</div>

Since in the [new version](https://github.com/laurent22/joplin/releases/tag/v1.0.216) of Joplin the Electron version has been updated ("Improved: Upgraded to Electron 8.2.5"), I tested this again.

Unfortunately, I have to report that the issue persists in version 1.0.216. I don't have access to the same machine (the current one is has much higher specs), so I got this from Activity Monitor with some baseline CPU usage for about 100 seconds and then scrolling for 20 seconds to show the effect:

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/e/ef00819e91f34d36c9c02a62b043fba4b8df0e7f.png)

The following is the details of the Joplin I tested:

> Joplin 1.0.216 (prod, linux)
> 
> Client ID: 2f9120d318dd49e7889b65150fa0fbeb  
> Sync Version: 1  
> Profile Version: 29
> 
> Revision: 4eb680d (master)
