Bug 423241 - Some layer operations are slow
Summary: Some layer operations are slow
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (other bugs)
Version First Reported In: 4.3.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-19 19:03 UTC by stephen
Modified: 2020-06-24 01:38 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Layer Operation lags (1.06 MB, image/gif)
2020-06-19 22:06 UTC, stephen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stephen 2020-06-19 19:03:01 UTC
SUMMARY

There's about 1 to 5+ seconds delays everytime the following layers operations are
performed : 
--adding a new layer
--removing a layer
--moving a layer to a different place in the layer stack
--selecting a layer

STEPS TO REPRODUCE
1. Create a new blank document file
2. Add at least two layers
3. Performing any of the following operations:
**select any a layer or group of layers
**delete one layer or group of layers
**add a new layer
**move a layer to different place in the layer stack

OBSERVED RESULT

There's always a considerable delay at the 
beginning/end of any of these operations.

EXPECTED RESULT
No delay at all for any of these operations.

SOFTWARE/OS VERSIONS
Windows 10 1909(OS Build 18363.900)

ADDITIONAL INFORMATION

Krita

 Version: 4.3.0
 Languages: en_US, en, en_US, en, en_US, en, en_US, en, en_US, en, en_US, en, en_US, en, en_US, en, en_US, en
 Hidpi: true

Qt

  Version (compiled): 5.12.8
  Version (loaded): 5.12.8

OS Information

  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 10.0.18363
  Pretty Productname: Windows 10 (10.0)
  Product Type: windows
  Product Version: 10

OpenGL Info
 
  Vendor:  "NVIDIA Corporation" 
  Renderer:  "GeForce GT 640M/PCIe/SSE2" 
  Version:  "4.6.0 NVIDIA 425.31" 
  Shading language:  "4.60 NVIDIA" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QSurfaceFormat::sRGBColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
     Version: 4.6
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsAngleD3D11: true 
  isQtPreferAngle: false 

Hardware Information

  GPU Acceleration: desktop
  Memory: 12126 Mb
  Number of Cores: 4
  Swap Location: C:/Users/Yed/AppData/Local/Temp

Current Settings

  Current Swap Location: C:/Users/Yed/AppData/Local/Temp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 400
  Use OpenGL: true
  Use OpenGL Texture Buffer: false
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 300
  Use Backup Files: false
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: false
  Use Zip64: false


Display Information
Number of screens: 1
	Screen: 0
		Name: \\.\DISPLAY1
		Depth: 32
		Scale: 1
		Resolution in pixels: 1600x900
		Manufacturer: 
		Model: 
		Refresh Rate: 60

Current Settings

  Current Swap Location: C:/Users/Yed/AppData/Local/Temp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 400
  Use OpenGL: true
  Use OpenGL Texture Buffer: false
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 300
  Use Backup Files: false
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: false
  Use Zip64: false


Current Settings

  Current Swap Location: C:/Users/Yed/AppData/Local/Temp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 400
  Use OpenGL: true
  Use OpenGL Texture Buffer: false
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 300
  Use Backup Files: false
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: false
  Use Zip64: false


Current Settings

  Current Swap Location: C:/Users/Yed/AppData/Local/Temp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 400
  Use OpenGL: true
  Use OpenGL Texture Buffer: false
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 300
  Use Backup Files: false
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: false
  Use Zip64: false


Current Settings

  Current Swap Location: C:/Users/Yed/AppData/Local/Temp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 400
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 300
  Use Backup Files: false
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: false
  Use Zip64: false


Current Settings

  Current Swap Location: C:/Users/Yed/AppData/Local/Temp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 400
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 300
  Use Backup Files: false
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: false
  Use Zip64: false
Comment 1 wolthera 2020-06-19 19:09:40 UTC
Not getting this on Linux with 4.3.1-alpha (git cbaa3e5)

Must be a windows only issue?
Comment 2 Halla Rempt 2020-06-19 19:11:46 UTC
I'm not getting this on windows either
Comment 3 vanyossi 2020-06-19 20:45:15 UTC
Also this is not present on macos
Comment 4 stephen 2020-06-19 21:08:39 UTC
(In reply to vanyossi from comment #3)
> Also this is not present on macos

It's a Windows issue. And I included my OS version in the details.
If it's not happening to you, it's happening to me.
In principle, such layer operations should execute in an instant. 
But the delay is too much (between 1 and 5 seconds) and there are probably things to optimize/fix with the feature.

I tried other softwares like Photoshop CS6, Medibang Paint Pro and Clip Studio Paint, and there's no such problem with them.

In Photoshop CS6, color picking happens like if it was light speed. It's so so fast, and I think it should be the same with Krita. Seriously.
Comment 5 stephen 2020-06-19 21:10:49 UTC
(In reply to Boudewijn Rempt from comment #2)
> I'm not getting this on windows either

Good for you. It's not the case from my side and apparently there's another person who posted about the same issue a few momentn after I filed this bug.
This means I'm not the only one with this problem.
Comment 6 wolthera 2020-06-19 21:14:24 UTC
(In reply to stephen from comment #5)
> (In reply to Boudewijn Rempt from comment #2)
> > I'm not getting this on windows either
> 
> Good for you. It's not the case from my side and apparently there's another
> person who posted about the same issue a few momentn after I filed this bug.
> This means I'm not the only one with this problem.

Where did they post that? Because you're the only one who reported a bug?

We're not calling you a liar, we just need to be able to reproduce the issue to fix it, so there must be something missing here that is happening on your system and not on any of ours. We need to figure out what that is, can you make a video maybe?
Comment 7 vanyossi 2020-06-19 21:51:17 UTC
> 
> It's a Windows issue. And I included my OS version in the details.
> If it's not happening to you, it's happening to me.

We as bug reviewers read the headers and descriptions, if the bug has some potential to be happening on other platforms we have to test. I do mostly macos testing, you dont have to be rude or feel ofended, what we post is information to other developers so we have a full picture of what could be happening. You might have reported for Windows because that is what you use, not because its the only platform the issue might be present.

For your peace of mind I also tested on Windows 10 (1909), 64-bit installer version of krita 4.3.0 (intel graphics card) and I also did not experience any issue or delays as described in your origina post.

Please do as @Wolthera has instructed you in hopes of geting more info and be of aid in finding what could be causing this on your system.
Comment 8 stephen 2020-06-19 22:06:56 UTC
Created attachment 129534 [details]
Layer Operation lags

(In reply to wolthera from comment #6)
> (In reply to stephen from comment #5)
> > (In reply to Boudewijn Rempt from comment #2)
> > > I'm not getting this on windows either
> > 
> > Good for you. It's not the case from my side and apparently there's another
> > person who posted about the same issue a few momentn after I filed this bug.
> > This means I'm not the only one with this problem.
> 
> Where did they post that? Because you're the only one who reported a bug?
> 
> We're not calling you a liar, we just need to be able to reproduce the issue
> to fix it, so there must be something missing here that is happening on your
> system and not on any of ours. We need to figure out what that is, can you
> make a video maybe?

There you go.
Comment 9 vanyossi 2020-06-19 22:48:04 UTC
Change

Settings->Configure Krita -> Display -> Preferred Renderer

to Direct X11 via ANGLE and restart krita.

It appears you have set OpenGL or something else that is not working properly. On my Windows system setting this to software or openGL introduce a big delay in the first case and a small delay in the second case. Never as sever as yours.

Also check the performance section and review you have sane options set up.

Let me know if that helped.
Comment 10 stephen 2020-06-19 23:11:51 UTC
(In reply to vanyossi from comment #9)
> Change
> 
> Settings->Configure Krita -> Display -> Preferred Renderer
> 
> to Direct X11 via ANGLE and restart krita.
> 
> It appears you have set OpenGL or something else that is not working
> properly. On my Windows system setting this to software or openGL introduce
> a big delay in the first case and a small delay in the second case. Never as
> sever as yours.
> 
> Also check the performance section and review you have sane options set up.
> 
> Let me know if that helped.

After setting it to Direct X11, I noticed slight performance gains with some UI operations, especially resizing some dockers(brush presets, small color selector, grid and guides, palette...) 
But the problem with layers remains the same. And when I merge or undo my last layers merging operation, it takes between about 3-5 seconds.
Comment 11 Bug Janitor Service 2020-06-20 04:33:09 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 12 vanyossi 2020-06-24 01:38:29 UTC
I don't want to sound rude or dismissive, but I think it is best if you discuss and try to solve this issue with users input. There is not enought specific information for us to pinpoint the reason its taking so long in your system. At this point my experience is suggesting there is some configuration issue on the system that is causing this, it could be a background process, driver issue, antivirus software, krita options, etc. For investigating these possible causes this is not the appropiate place as more people can help you on a user driven forum. 

Im going to suggest you first move this issue to https://krita-artists.org/ a user-space oriented support as im guessing there is something in configuration/drivers/software combination that is messing with the system. The forum is much more suitable for investigating, discussing misterious occurences like this that might be related to things outside Krita's source code.

Im going to close this report, but if during the discussion in the forums you find out the specific reason this is happening, you can reopen this bug with the findings, as currently there is nothing I can do to even come close to replicate the behaviour you are getting.