| Summary: | TDE Hardware Manager is VERY slow and mostly completely freezes | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Roman Savochenko <rom_as> |
| Component: | tdebase | Assignee: | Timothy Pearson <kb9vqf> |
| Status: | PATCHAVAIL --- | ||
| Severity: | major | CC: | bugwatch, rom_as |
| Priority: | P5 | ||
| Version: | R14.0.x [Trinity] | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Attachments: |
hwmanager-NoFreeze.patch
tdehw-NoFreeze.patch |
||
Created attachment 3052 [details]
tdehw-NoFreeze.patch
As me learned the issue deeply, this problem is in tdelibs/tdecore/tdehw, in the class TDEHardwareDevices of the files tdehardwaredevices.{h,cpp}. In the Timer invokes processModifiedCPUs() and processStatelessDevices() which are called in the main Qt GUI thread, with fixed small intervals and consume many time even on powerful hardware:
• processModifiedCPUs() up to 200ms (40%);
• processStatelessDevices() up to 1s (50%) without the notification and WHOLE Timer cycle with notification tdebase/kcontrol/hwmanager.
That is a BAD practice and if you call such functions in the main Qt GUI thread, you must whether to limit the functions time, doing only some part of all works, what I have added to processStatelessDevices(), or to stretch the Timer interval dynamically, what I have added to processModifiedCPUs(). And the first way is a preferable one and must be implemented for processModifiedCPUs() also.
|
Created attachment 3048 [details] hwmanager-NoFreeze.patch I have got such behaviour at least on two modern enough hardware environments Intel(R) Core(TM) i7-5600U and AMD A8-6500 APU. So, once I enter to HM, that freezes mostly. That is related seems with reading some hardware in long time and if I comment that link in the file /kcontrol/hwmanager/hwmanager.cpp, I get the slow work, but that isn't the complete freeze: connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));