Skip to content

Commit efa4af2

Browse files
committed
Do not trace functions OnPluginDrawOutputWindow or OnPluginTick
1 parent 6fd17d9 commit efa4af2

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

scripting/lua_scripting.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,10 @@ bool CScriptEngine::ExecuteLua (DISPID & dispid, // dispatch ID, will be set to
484484
LARGE_INTEGER start,
485485
finish;
486486

487-
m_pDoc->Trace (TFormat ("Executing %s script \"%s\"", szType, szProcedure));
487+
// do not trace OnPluginDrawOutputWindow or OnPluginTick because they can spam the output window
488+
if (strcmp (szProcedure, "OnPluginDrawOutputWindow") != 0 &&
489+
strcmp (szProcedure, "OnPluginTick") != 0)
490+
m_pDoc->Trace (TFormat ("Executing %s script \"%s\"", szType, szProcedure));
488491

489492
if (App.m_iCounterFrequency)
490493
QueryPerformanceCounter (&start);
@@ -702,7 +705,10 @@ bool CScriptEngine::ExecuteLua (DISPID & dispid, // dispatch ID, will b
702705
LARGE_INTEGER start,
703706
finish;
704707

705-
m_pDoc->Trace (TFormat ("Executing %s script \"%s\"", szType, szProcedure));
708+
// do not trace OnPluginDrawOutputWindow or OnPluginTick because they can spam the output window
709+
if (strcmp (szProcedure, "OnPluginDrawOutputWindow") != 0 &&
710+
strcmp (szProcedure, "OnPluginTick") != 0)
711+
m_pDoc->Trace (TFormat ("Executing %s script \"%s\"", szType, szProcedure));
706712

707713
if (App.m_iCounterFrequency)
708714
QueryPerformanceCounter (&start);

scripting/scriptengine.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,12 @@ bool CScriptEngine::Execute (DISPID & dispid, // dispatch ID, will be set to DI
6767
finish;
6868
SCRIPTSTATE ss;
6969

70-
m_pDoc->Trace (TFormat ("Executing %s script \"%s\"", szType, szProcedure));
71-
// Frame.SetStatusMessageNow (TFormat ("Executing %s subroutine \"%s\"", szType, szProcedure));
70+
// do not trace OnPluginDrawOutputWindow or OnPluginTick because they can spam the output window
71+
if (strcmp (szProcedure, "OnPluginDrawOutputWindow") != 0 &&
72+
strcmp (szProcedure, "OnPluginTick") != 0)
73+
m_pDoc->Trace (TFormat ("Executing %s script \"%s\"", szType, szProcedure));
74+
75+
// Frame.SetStatusMessageNow (TFormat ("Executing %s subroutine \"%s\"", szType, szProcedure));
7276

7377
if (m_IActiveScript)
7478
{

0 commit comments

Comments
 (0)