Bug 579022 - 7 seconds UI freeze on win32.OS.PatBlt and other win32.OS methods
Summary: 7 seconds UI freeze on win32.OS.PatBlt and other win32.OS methods
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5.1   Edit
Hardware: PC Windows 10
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-01 04:50 EST by Leung Wang Hei CLA
Modified: 2022-03-08 03:14 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leung Wang Hei CLA 2022-03-01 04:50:17 EST
UI freeze monitor embedded in our RCP application detects UI freeze for 1~7s.  All are logged with win32.OS methods.  

According to doc, these are native method and calls Windows for painting and drawing. I am not sure how could the application causing a 7s method call down to the system.  

Any advice is greatly appreciated.



A few examples attached below.  

1) 7s on OS.PatBlt
!MESSAGE UI freeze of 7.0s at 10:47:41.624
!SUBENTRY 1 org.eclipse.ui.monitoring 1 0 2022-03-01 10:47:48.604
!MESSAGE Sample at 10:47:43.879 (+2.255s)
Thread 'main' tid=1 (RUNNABLE)
!STACK 0
java.lang.Exception: Stack Trace
	at org.eclipse.swt.internal.win32.OS.PatBlt(Native Method)
	at org.eclipse.swt.graphics.GC.fillRectangle(GC.java:3039)
	at org.eclipse.swt.graphics.GC.fillRectangle(GC.java:3059)

2) 7s on OS.DrawTextW
!MESSAGE UI freeze of 7.1s at 10:49:24.904
!SUBENTRY 1 org.eclipse.ui.monitoring 1 0 2022-03-01 10:49:31.969
!MESSAGE Sample at 10:49:27.014 (+2.110s)
Thread 'main' tid=1 (RUNNABLE)
!STACK 0
java.lang.Exception: Stack Trace
	at org.eclipse.swt.internal.win32.OS.DrawTextW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DrawText(OS.java:2579)
	at org.eclipse.swt.graphics.GC.textExtent(GC.java:5035)
	at org.eclipse.swt.graphics.GC.textExtent(GC.java:4979)
Comment 1 Rolf Theunissen CLA 2022-03-08 03:13:11 EST
You are using a very old version of Eclipse, first suggestion would be to update to a newer version.

Secondly, as you are running on Windows 10, are you running Windows Defender? It is know to cause performance issues.
See the note and workaround on the New and Noteworthy page, this applies to any Eclipse version
https://www.eclipse.org/eclipse/news/4.23/