Bug 419362 - CPU usage spike when viewing Krita logs
Summary: CPU usage spike when viewing Krita logs
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (other bugs)
Version First Reported In: nightly build (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: efficiency-and-performance, triaged
Depends on:
Blocks:
 
Reported: 2020-03-29 09:36 UTC by til.schmitter
Modified: 2022-06-26 09:36 UTC (History)
2 users (show)

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


Attachments
cpu usage spike (27.51 KB, image/png)
2020-03-29 09:36 UTC, til.schmitter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description til.schmitter 2020-03-29 09:36:47 UTC
Created attachment 127078 [details]
cpu usage spike

i'm using krita next b1b691b and got 15% CPU usage whenever i opened the krita logs (stops after about 10 seconds)

-this makes all of krita lag

-fixed immediately when i close the window

-doesn't occur when viewing system info or any other text window

-100% reproducible

2 of my 8 cores are at ~60% during this time


my complete hardware info:

(i have an i7 6700 and an SSD which krita is installed to in case that's relevant)

Krita

 Version: 4.3.0-prealpha (git b1b691b)
 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, de_DE, de, en_US, en
 Hidpi: true

Qt

  Version (compiled): 5.12.7
  Version (loaded): 5.12.7

OS Information

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

OpenGL Info
 
  Vendor:  "NVIDIA Corporation" 
  Renderer:  "GeForce GTX 970/PCIe/SSE2" 
  Version:  "4.6.0 NVIDIA 441.20" 
  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: auto
  Memory: 16327 Mb
  Number of Cores: 8
  Swap Location: C:/Users/Til/AppData/Local/Temp

Current Settings

  Current Swap Location: C:/Users/Til/AppData/Local/Temp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 75
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 1200
  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: 1920x1080
		Manufacturer: 
		Model: 
		Refresh Rate: 60

Current Settings

  Current Swap Location: C:/Users/Til/AppData/Local/Temp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 75
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 1200
  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


Log:

================================================================================
SESSION: 29 Mar 2020 10:10:12 +0200. Executing C:\Program Files\Krita (x64)\bin\krita.exe

Krita Version: 4.3.0-prealpha (git b1b691b), Qt version compiled: 5.12.7, loaded: 5.12.7. Process ID: 1244
-- -- -- -- -- -- -- --
29 Mar 2020 10:10:14 +0200: Database is up to date. Version: Unknown, created by Krita Unknown, at Do Jan 1 01:00:00 1970
Comment 1 Halla Rempt 2020-03-29 09:38:23 UTC
Do you mean you opened the Show Krita Log for Bug Reports window or the Log Viewer docker?
Comment 2 til.schmitter 2020-03-29 10:44:59 UTC
i went to
help > show krita log for bug report
Comment 3 til.schmitter 2020-03-29 11:51:56 UTC
this seems to be related to loading the logs. i have a pretty long log that dates back to august 2019 and while it's lagging it seems to not have loaded most of the logs yet. the side scrollbar is much smaller (longer log page) after the lag has ended
Comment 4 Halla Rempt 2020-05-05 11:40:16 UTC
I wonder how that could make krita lag, because the log window is modal. You can't do anything when it's open. Though I can imagine that a really long log file is too much for Qt's QTextBrowser.
Comment 5 til.schmitter 2022-06-26 09:36:08 UTC
just checked, no longer an issue on 5.2.0-prealpha-0f478fc69b