V 2.9.5 Logging Hotspots,

This commit is contained in:
Developer01
2026-07-02 16:35:40 +02:00
parent f571764588
commit de80d564b1
4 changed files with 27 additions and 3155 deletions

View File

@@ -114,9 +114,9 @@ Namespace ControlCreator
' *** DEBUG: Log VOR/NACH (nur beim ersten Aufruf) *** ' *** DEBUG: Log VOR/NACH (nur beim ersten Aufruf) ***
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
_Logger.Info("[ResolveSqlTemplate] BEFORE: {0}", _Logger.Info("LOG_HOTSPOTS [ResolveSqlTemplate] BEFORE: {0}",
beforeReplace.Substring(0, Math.Min(150, beforeReplace.Length))) beforeReplace.Substring(0, Math.Min(150, beforeReplace.Length)))
_Logger.Info("[ResolveSqlTemplate] AFTER: {0}", _Logger.Info("LOG_HOTSPOTS [ResolveSqlTemplate] AFTER: {0}",
resolvedSql.Substring(0, Math.Min(150, resolvedSql.Length))) resolvedSql.Substring(0, Math.Min(150, resolvedSql.Length)))
End If End If
Else Else
@@ -843,14 +843,14 @@ Namespace ControlCreator
' Cache prüfen ' Cache prüfen
SyncLock _DynamicEditorCacheShared SyncLock _DynamicEditorCacheShared
If _DynamicEditorCacheShared.ContainsKey(cacheKey) Then If _DynamicEditorCacheShared.ContainsKey(cacheKey) Then
_Logger.Info("[CustomRowCellEdit] ✓ CACHE HIT: [{0}]", cacheKey) _Logger.Debug("[CustomRowCellEdit] ✓ CACHE HIT: [{0}]", cacheKey)
e.RepositoryItem = _DynamicEditorCacheShared(cacheKey) e.RepositoryItem = _DynamicEditorCacheShared(cacheKey)
Return Return
End If End If
End SyncLock End SyncLock
' Editor erstellen mit RESOLVED SQL ' Editor erstellen mit RESOLVED SQL
_Logger.Info("[CustomRowCellEdit] 🆕 MISS: Creating editor for [{0}]", e.Column.FieldName) _Logger.Debug("[CustomRowCellEdit] 🆕 MISS: Creating editor for [{0}]", e.Column.FieldName)
Dim realEditor = CreateRowSpecificEditor( Dim realEditor = CreateRowSpecificEditor(
e.Column.FieldName, e.Column.FieldName,
resolvedSql, resolvedSql,
@@ -865,7 +865,7 @@ Namespace ControlCreator
_DynamicEditorCacheShared.Add(cacheKey, realEditor) _DynamicEditorCacheShared.Add(cacheKey, realEditor)
End If End If
End SyncLock End SyncLock
_Logger.Info("[CustomRowCellEdit] ✓ Cached [{0}] editor (Type=[{1}])", e.Column.FieldName, realEditor.GetType().Name) _Logger.Debug("[CustomRowCellEdit] ✓ Cached [{0}] editor (Type=[{1}])", e.Column.FieldName, realEditor.GetType().Name)
e.RepositoryItem = realEditor e.RepositoryItem = realEditor
Else Else
_Logger.Warn("[CustomRowCellEdit] CreateRowSpecificEditor returned Nothing for [{0}]", e.Column.FieldName) _Logger.Warn("[CustomRowCellEdit] CreateRowSpecificEditor returned Nothing for [{0}]", e.Column.FieldName)

View File

@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.9.4.0")> <Assembly: AssemblyVersion("2.9.5.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>
<Assembly: NeutralResourcesLanguage("")> <Assembly: NeutralResourcesLanguage("")>

View File

@@ -4150,7 +4150,7 @@ Public Class frmValidator
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
perfStart = DateTime.Now perfStart = DateTime.Now
perfLastCheck = perfStart perfLastCheck = perfStart
MyValidationLogger.Info("[PERF LND] Load_Next_Document START") MyValidationLogger.Info("[LOG_HOTSPOTS] Load_Next_Document START")
End If End If
_CachedSqlDataCache.Clear() _CachedSqlDataCache.Clear()
@@ -4198,7 +4198,7 @@ Public Class frmValidator
End If End If
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF LND] Nach Get_Next_GUID: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") MyValidationLogger.Info($"[LOG_HOTSPOTS] Nach Get_Next_GUID: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now perfLastCheck = DateTime.Now
End If End If
@@ -4209,7 +4209,7 @@ Public Class frmValidator
End If End If
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF LND] Nach GetDocPathWindows: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") MyValidationLogger.Info($"[LOG_HOTSPOTS] Nach GetDocPathWindows: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now perfLastCheck = DateTime.Now
End If End If
@@ -4221,7 +4221,7 @@ Public Class frmValidator
Load_IDB_DOC_DATA() Load_IDB_DOC_DATA()
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF LND] Nach Load_IDB_DOC_DATA: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") MyValidationLogger.Info($"[LOG_HOTSPOTS] Nach Load_IDB_DOC_DATA: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now perfLastCheck = DateTime.Now
End If End If
If IsNothing(IDB_DT_DOC_DATA) Then If IsNothing(IDB_DT_DOC_DATA) Then
@@ -4235,12 +4235,12 @@ Public Class frmValidator
End If End If
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF LND] Nach CreateWMObject/Load_IDB_DOC_DATA: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") MyValidationLogger.Info($"[LOG_HOTSPOTS] Nach CreateWMObject/Load_IDB_DOC_DATA: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now perfLastCheck = DateTime.Now
End If End If
PRTF_PROFILE_FILES_WORK("InWork") PRTF_PROFILE_FILES_WORK("InWork")
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF LND] Nach IN_WORK-UPDATE: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") MyValidationLogger.Info($"[LOG_HOTSPOTS] Nach IN_WORK-UPDATE: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now perfLastCheck = DateTime.Now
End If End If
@@ -4268,7 +4268,7 @@ Public Class frmValidator
End If End If
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF LND] Nach Windream_get_Doc_info: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") MyValidationLogger.Info($"[LOG_HOTSPOTS] Nach Windream_get_Doc_info: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now perfLastCheck = DateTime.Now
End If End If
@@ -4285,9 +4285,9 @@ Public Class frmValidator
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
oMilliseconts = (DateTime.Now - perfLastCheck).TotalMilliseconds oMilliseconts = (DateTime.Now - perfLastCheck).TotalMilliseconds
If oMilliseconts > 6000 Then If oMilliseconts > 6000 Then
MyValidationLogger.Warn($"[PERF LND] ⚠️ LoadDocument_DDViewer lasted far to long: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") MyValidationLogger.Warn($"[LOG_HOTSPOTS] ⚠️ LoadDocument_DDViewer lasted far to long: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
Else Else
MyValidationLogger.Info($"[PERF LND] Nach LoadDocument_DDViewer: {oMilliseconts}ms") MyValidationLogger.Info($"[LOG_HOTSPOTS] Nach LoadDocument_DDViewer: {oMilliseconts}ms")
End If End If
perfLastCheck = DateTime.Now perfLastCheck = DateTime.Now
End If End If
@@ -4336,9 +4336,9 @@ Public Class frmValidator
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
oMilliseconts = (DateTime.Now - perfLastCheck).TotalMilliseconds oMilliseconts = (DateTime.Now - perfLastCheck).TotalMilliseconds
If oMilliseconts > 6000 Then If oMilliseconts > 6000 Then
MyValidationLogger.Warn($"[PERF LND] ⚠️ FillIndexValues lasted far to long: {oMilliseconts}ms") MyValidationLogger.Warn($"[LOG_HOTSPOTS] ⚠️ FillIndexValues lasted far to long: {oMilliseconts}ms")
Else Else
MyValidationLogger.Info($"[PERF LND] Nach FillIndexValues: {oMilliseconts}ms") MyValidationLogger.Info($"[LOG_HOTSPOTS] Nach FillIndexValues: {oMilliseconts}ms")
End If End If
perfLastCheck = DateTime.Now perfLastCheck = DateTime.Now
@@ -4370,7 +4370,7 @@ Public Class frmValidator
End If End If
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF LND] Nach LoadSQLData-Loop: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") MyValidationLogger.Info($"[LOG_HOTSPOTS] Nach LoadSQLData-Loop: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now perfLastCheck = DateTime.Now
End If End If
@@ -4452,7 +4452,7 @@ Public Class frmValidator
End Try End Try
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF LND] Nach Currency-Format: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") MyValidationLogger.Info($"[LOG_HOTSPOTS] Nach Currency-Format: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now perfLastCheck = DateTime.Now
End If End If
@@ -4464,9 +4464,9 @@ Public Class frmValidator
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
oMilliseconts = (DateTime.Now - perfLastCheck).TotalMilliseconds oMilliseconts = (DateTime.Now - perfLastCheck).TotalMilliseconds
If oMilliseconts > 6000 Then If oMilliseconts > 6000 Then
MyValidationLogger.Warn($"[PERF LND] ⚠️ Show_WF_Messages lasted far to long: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") MyValidationLogger.Warn($"[LOG_HOTSPOTS] ⚠️ Show_WF_Messages lasted far to long: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
Else Else
MyValidationLogger.Info($"[PERF LND] Nach Show_WF_Messages: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") MyValidationLogger.Info($"[LOG_HOTSPOTS] Nach Show_WF_Messages: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
End If End If
perfLastCheck = DateTime.Now perfLastCheck = DateTime.Now
@@ -4480,7 +4480,7 @@ Public Class frmValidator
Controls2B_EnDisabled_onLoad() Controls2B_EnDisabled_onLoad()
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
MyValidationLogger.Info($"[PERF LND] Nach Controls2B_EnDisabled: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") MyValidationLogger.Info($"[LOG_HOTSPOTS] Nach Controls2B_EnDisabled: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms")
perfLastCheck = DateTime.Now perfLastCheck = DateTime.Now
End If End If
MyValidationLogger.Debug("frmValidator: LoadNextDocument finished!") MyValidationLogger.Debug("frmValidator: LoadNextDocument finished!")
@@ -4500,11 +4500,11 @@ Public Class frmValidator
CloseOverlaySafe() CloseOverlaySafe()
If LOG_HOTSPOTS Then If LOG_HOTSPOTS Then
' ========== DIAGNOSE ENDE ========== ' ========== DIAGNOSE ENDE ==========
MyValidationLogger.Info($"[INFO] Load_Next_Document ENDE") MyValidationLogger.Info($"[LHS] Load_Next_Document ENDE")
MyValidationLogger.Info($" frmValidator.IsDisposed: {Me.IsDisposed}") MyValidationLogger.Info($"[LHS] frmValidator.IsDisposed: {Me.IsDisposed}")
MyValidationLogger.Info($" frmValidator.Visible: {Me.Visible}") MyValidationLogger.Info($"[LHS] frmValidator.Visible: {Me.Visible}")
' ========== ENDE DIAGNOSE ========== ' ========== ENDE DIAGNOSE ==========
MyValidationLogger.Info($"[PERF LND] Load_Next_Document GESAMT: {(DateTime.Now - perfStart).TotalMilliseconds}ms") MyValidationLogger.Info($"[LHS] Load_Next_Document GESAMT: {(DateTime.Now - perfStart).TotalMilliseconds}ms")
End If End If
End Try End Try
End Sub End Sub

File diff suppressed because it is too large Load Diff