CodeGlancePro icon indicating copy to clipboard operation
CodeGlancePro copied to clipboard

[BUG] Laggy scrolling when NOT using CodeGlance Pro

Open slightlyfaulty opened this issue 2 years ago • 23 comments

Which Glance version and IDEA version?

PHPStorm 2022.1.3 build 221.5921.28 CodeGlance Pro 1.4.1

What steps will reproduce the issue?

  1. Start a fresh installation of PHPStorm (or similar).
  2. Scroll a long file - scrolling is smooth.
  3. Install CodeGlance Pro and enable it - scrolling is smooth.
  4. Disable CodeGlance Pro - scrolling is laggy/janky.
  5. Disable the CodeGlance Pro plugin - restart IDE - scrolling is laggy/janky.
  6. Uninstall CodeGlance Pro plugin - restart IDE - scrolling is STILL laggy/janky.

It seems like CodeGlance Pro changes the IDE settings in some way that affects scrolling performance, even when CodeGlance Pro is disabled or uninstalled.

Furthermore, scrolling large files with CodeGlance Pro enabled is a bit laggy. On a fresh IDE it's very smooth even for large files. In my opinion this is not an issue as long as I can temporarily disable CodeGlance Pro for large files to make scrolling smooth, like the default. But instead scrolling is always laggy/janky when CodeGlance Pro is disabled.

https://user-images.githubusercontent.com/2036475/176000120-d0e5de3d-26fe-469c-b03d-8eaca29e42e1.mp4

slightlyfaulty avatar Jun 27 '22 17:06 slightlyfaulty

Actually I managed to fix my issue with scroll lagging on large files with CodeGlance Pro ON. My GPU was in power-save mode which was affecting performance.

But the main issue still remains. When I turn CodeGlance Pro OFF, scrolling is noticeably more laggy. And it remains so even after uninstalling CodeGlance Pro.

With this bug I'm stuck using your plugin. Luckily it's a great plugin! 😂

slightlyfaulty avatar Jun 27 '22 22:06 slightlyfaulty

OK, I'll try this mode later

Nasller avatar Jun 28 '22 01:06 Nasller

image Did you check this?

Nasller avatar Jun 28 '22 02:06 Nasller

I don't use Power Save Mode. It looks like smooth scrolling is disabled completely when it's enabled.

slightlyfaulty avatar Jun 28 '22 02:06 slightlyfaulty

yes,it is. Is your system macos?

Nasller avatar Jun 28 '22 02:06 Nasller

No, I use Linux. I have a very decent desktop PC. I use PHPStorm on my main 144hz monitor, and I have a second 75hz monitor.

The bug is a lot easier to see on my 144hz monitor because it's very smooth when ON, and not smooth at all when OFF. On my 75hz monitor the difference is harder to see because it's not as smooth to begin with.

But if you scroll up and down with the mouse wheel really fast you can see the difference. Sometimes I had to turn CodeGlance OFF/ON a few times before the scrolling started lagging.

slightlyfaulty avatar Jun 28 '22 02:06 slightlyfaulty

It's so strange that I can't reproduce your problem.😂I checked the IDE code and found that only Power Save Mode will not smooth when the opening. image

Nasller avatar Jun 28 '22 03:06 Nasller

It's not turning off smooth scrolling, it's more like the FPS performance of smooth scrolling drops when CodeGlance is OFF.

slightlyfaulty avatar Jun 28 '22 03:06 slightlyfaulty

I only know that when the CodeGlance will renaint when the scrolling occurs. I added a judgment in the repaint fun shouldNotUpdate() = isDisabled || project.isDisposed || (!config.hoveringToShowScrollBar && !isVisible) if i remove the (!config.hoveringToShowScrollBar && !isVisible) then you try the scrolling?(use the hide and show button) CodeGlance Pro-1.4.1.zip

Nasller avatar Jun 28 '22 04:06 Nasller

No change unfortunately.

Here's another video actually showing the FPS drop. Notice that FPS stays around 120 with CodeGlance open, and it drops to ~30 FPS with CodeGlance closed.

https://user-images.githubusercontent.com/2036475/176224108-a7930c70-acf3-4f14-a936-0f1fb349925f.mp4

Note that FPS is slightly more reduced due to recording.

slightlyfaulty avatar Jun 28 '22 15:06 slightlyfaulty

It also seems like performance is affected the more complex the editor content is, i.e. long file with lots of syntax highlighting and warnings/errors.

slightlyfaulty avatar Jun 28 '22 15:06 slightlyfaulty

Okay, I see. Probably the fps will be reduced when there is only an editor. This should be asked the official. I guess jbr judged that there are graphics, so it uses high fps?

Nasller avatar Jun 28 '22 16:06 Nasller

The problem is, on a new installation of PhpStorm (or other IDE), there is no FPS issue. It's 100% smooth.

After you install and use CodeGlance Pro, the issue begins. When you disable or uninstall CodeGlance Pro, the issue persists.

So there's no issue until CodeGlance Pro is installed, and you can't fix it even by uninstalling CodeGlance Pro.

slightlyfaulty avatar Jun 28 '22 16:06 slightlyfaulty

In any case, this is not an urgent issue for me because I love CodeGlance Pro and will continue to use it.

It's only a problem if I ever decide to stop using CodeGlance Pro 😆

At this point I'm just reporting it for you to be aware of. Please don't worry about trying to fix it urgently on my account.

slightlyfaulty avatar Jun 28 '22 16:06 slightlyfaulty

ok,thanks. Emmm, has this problem appeared in previous versions?

Nasller avatar Jun 28 '22 16:06 Nasller

I tested older version of PhpStorm yesterday, back to 2019 versions, and the same issue happens.

I also tested the other CodeGlance2 and CodeGlance3 plugins, and the same issue happens.

slightlyfaulty avatar Jun 28 '22 16:06 slightlyfaulty

But I tested CodeGlance2 and CodeGlance3 after already using CodeGlance Pro, so I'm not sure. I didn't test them on a fresh install.

slightlyfaulty avatar Jun 28 '22 16:06 slightlyfaulty

ok,thanks.i will check

Nasller avatar Jun 28 '22 23:06 Nasller

I want to ask what FPS monitoring software you use?

Nasller avatar Jun 29 '22 02:06 Nasller

I used MangoHud. It only works on Linux as far as I know.

On Windows I believe Fraps is a popular choice.

slightlyfaulty avatar Jun 29 '22 05:06 slightlyfaulty

https://youtrack.jetbrains.com/issue/IDEA-267820 hi,check this.smooth scroll options.Whether it is useful

Nasller avatar Jun 29 '22 06:06 Nasller

I guess this is a special situation, because my monitor is also a 144Hz display, and not happen this issues. I didn’t find the application that can open FPS on Windows,most of using in game,and FRAPS doesn’t work. Sorry cant help you

QQ截图20220629215307

https://user-images.githubusercontent.com/26132153/176464622-a503fda3-8d11-459d-9804-90d23b2d89ea.mp4

Nasller avatar Jun 29 '22 14:06 Nasller

Hmm I see. I guess it could be specific to Linux, or PhpStorm, or compatibility with another plugin.

It's just strange that it's smooth when CodeGlance is open, but drops FPS when CodeGlance is closed. I wonder what changes when this happens.

Anyway as I said before, it doesn't affect me much since I use CodeGlance all the time. Hopefully this only affects me and no one else.

Thanks for the quick response looking into this issue.

slightlyfaulty avatar Jun 29 '22 19:06 slightlyfaulty

Sorry, I want to ask if you tried to delete the .idea folder? i guess no need to install a fresh PHPStorm. The .idea folder stored a lot of information, delete it project will become a new project, and the storage based on project will be new(You can move the .idea folder to other places instead of deleting).if this work,i will see what is stored

Nasller avatar Sep 06 '22 02:09 Nasller

Well I'm not sure what's changed since I posted this, but I don't seem to be having this issue anymore. Hooray!

slightlyfaulty avatar Sep 06 '22 23:09 slightlyfaulty

ok,thanks

Nasller avatar Sep 07 '22 00:09 Nasller