PerfMon plugin lagging similar to AdvancedCPU
Posted: February 15th, 2018, 5:35 pm
I am at a complete loss here. In my last report, AdvancedCPU was exhibiting a "lag" behavior that spiked Rainmeter's CPU usage up by over 10%. However, now I've discovered that the PerfMon plugin is doing the same thing.
I have a simple skin that monitors two specific processes: Rainmeter and Factorio. It monitors both the CPU usage and the amount of RAM used by these applications. All of the measures use PerfMon.
I already tried to rebuild the counters, twice. And I restarted my computer multiple times, reinstalled a clean slate of Rainmeter, went back and forth between beta and stable, all to no avail. The lag caused by these five measures is horrendous.
Here is the code for the skin in question. NOTE: THIS SKIN REQUIRES SEVERAL EXTERNAL FILES AND WILL NOT WORK WITHOUT THEM. For debugging, you'll have to download the process-meter branch of ModernGadgets' GitHub, or copy the measures into another skin.
ProcessDebug.ini:
I have a simple skin that monitors two specific processes: Rainmeter and Factorio. It monitors both the CPU usage and the amount of RAM used by these applications. All of the measures use PerfMon.
I already tried to rebuild the counters, twice. And I restarted my computer multiple times, reinstalled a clean slate of Rainmeter, went back and forth between beta and stable, all to no avail. The lag caused by these five measures is horrendous.
Here is the code for the skin in question. NOTE: THIS SKIN REQUIRES SEVERAL EXTERNAL FILES AND WILL NOT WORK WITHOUT THEM. For debugging, you'll have to download the process-meter branch of ModernGadgets' GitHub, or copy the measures into another skin.
ProcessDebug.ini:
Code: Select all
[Rainmeter]
Update=1000
MiddleMouseDownAction=[!Refresh]
MouseOverAction=[!ToggleMeterGroup ConfigButton][!UpdateMeterGroup Background][!Redraw]
MouseLeaveAction=[!ToggleMeterGroup ConfigButton][!UpdateMeterGroup Background][!Redraw]
LeftMouseDoubleClickAction=["taskmgr.exe"]
Group=ModernGadgets | MgGlobalRefresh | MgImportRefresh
AccurateText=1
; Custom Context Menu
ContextTitle=Process Meter settings
ContextAction=[!ActivateConfig "ModernGadgets\Config\Process" "Config.ini"]
ContextTitle2=Global settings
ContextAction2=[!ActivateConfig "ModernGadgets\Config\Global" "Config.ini"]
ContextTitle3=HWiNFO config tool
ContextAction3=[!ActivateConfig "ModernGadgets\Config\Hwinfo" "Config.ini"]
ContextTitle4=Gadget manager
ContextAction4=[!ActivateConfig "ModernGadgets\Config\GadgetManager" "Config.ini"]
[Metadata]
Name=Process Meter
Author=raiguard
Information=Displays processes sorted by CPU or RAM usage. Individual processes can also be specified for constant monitoring.
License=Creative Commons BY-NC-SA 3.0
Version=1.3.0-beta.4
[Variables]
@includeStyleSheet=#@#StyleSheet.inc
@includeGlobalSettings=#@#Settings\GlobalSettings.inc
@includeProcessSettings=#@#Settings\ProcessSettings.inc
textRamUsed=
textFactorioRamUsed=
[StyleStringProcessLabel]
FontFace=#processLabelFontFace#
W=(#contentWidth# - 73)
ClipString=1
Group=Label
[StyleStringRam]
X=(#contentMarginRight# - 40)
FontFace=#processLabelFontFace#
StringAlign=Right
[StyleStringProcessPercentage]
NumOfDecimals=1
Text="%1%"
Group=Percentage
; ========= Measures =========
[MeasureFixedPrecisionFormatScript]
Measure=Script
ScriptFile=#@#Scripts\FixedPrecisionFormat.lua
[MeasureMaxCpu]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=Process
PerfMonCounter=% Processor Time
PerfMonInstance=_Total
[MeasureRainmeterPerfMon]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=Process
PerfMonCounter=% Processor Time
PerfMonInstance=Rainmeter
MaxValue=[MeasureMaxCpu]
DynamicVariables=1
[MeasureFactorioPerfMon]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=Process
PerfMonCounter=% Processor Time
PerfMonInstance=Factorio
MaxValue=[MeasureMaxCpu]
DynamicVariables=1
[MeasureRainmeterRamUsed]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=Process
PerfMonCounter=Working Set - Private
PerfMonInstance=Rainmeter
PerfMonDifference=0
IfCondition=1
IfTrueAction=[!CommandMeasure MeasureFixedPrecisionFormatScript "FormatNumber([MeasureRainmeterRamUsed], 3, '1k', 'textRamUsed')"]
OnChangeAction=[!CommandMeasure MeasureFixedPrecisionFormatScript "FormatNumber([MeasureRainmeterRamUsed], 3, '1k', 'textRamUsed')"]
[MeasureFactorioRamUsed]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=Process
PerfMonCounter=Working Set - Private
PerfMonInstance=Factorio
PerfMonDifference=0
IfCondition=1
IfTrueAction=[!CommandMeasure MeasureFixedPrecisionFormatScript "FormatNumber([MeasureFactorioRamUsed], 3, '1k', 'textFactorioRamUsed')"]
OnChangeAction=[!CommandMeasure MeasureFixedPrecisionFormatScript "FormatNumber([MeasureFactorioRamUsed], 3, '1k', 'textFactorioRamUsed')"]
; ========= Meters =========
[Background]
Meter=Image
MeterStyle=StyleBackground
[ConfigButton]
Meter=Image
MeterStyle=StyleSettingsButton
; ----- Header -----
[GadgetHeaderImage]
Meter=String
MeterStyle=StyleString
X=#contentMargin#
Y=(#contentMargin#)
FontFace=ElegantIcons
FontColor=50,200,50
FontSize=10
Text="[\xe0e9]"
Antialias=0
[GadgetNameString]
Meter=String
MeterStyle=StyleString | StyleStringGadgetHeader
X=3R
Text="Process Meter"
; ----- Pinned Processes -----
; Rainmeter
[RainmeterLabel]
Meter=String
MeterStyle=StyleString | StyleStringProcessLabel
Text=Rainmeter
[RainmeterRamUsed]
Meter=String
MeterStyle=StyleString | StyleStringInfo | StyleStringRam
Text="#textRamUsed#B"
DynamicVariables=1
[RainmeterPercentage]
Meter=String
MeterStyle=StyleString | StyleStringRightAlign | StyleStringProcessPercentage
MeasureName=MeasureRainmeterPerfMon
Percentual=1
[RainmeterBar]
Meter=Bar
MeterStyle=StyleBar
MeasureName=MeasureRainmeterPerfMon
BarColor=255,0,0
; Factorio
[FactorioLabel]
Meter=String
MeterStyle=StyleString | StyleStringProcessLabel
Text=Factorio
[FactorioRamUsed]
Meter=String
MeterStyle=StyleString | StyleStringInfo | StyleStringRam
Text="#textFactorioRamUsed#B"
DynamicVariables=1
[FactorioPercentage]
Meter=String
MeterStyle=StyleString | StyleStringRightAlign | StyleStringProcessPercentage
MeasureName=MeasureFactorioPerfMon
Percentual=1
[FactorioBar]
Meter=Bar
MeterStyle=StyleBar
MeasureName=MeasureFactorioPerfMon
BarColor=0,255,0
[BackgroundHeight]
Meter=Image
MeterStyle=StyleBackgroundHeight