Skip to content

Commit

Permalink
Only start the event loop performance timer if we are in developer mode
Browse files Browse the repository at this point in the history
  • Loading branch information
JoergAtGithub committed Jun 28, 2024
1 parent 3535749 commit 2e7901b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/mixxxapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "track/track.h"
#include "track/trackref.h"
#include "util/cache.h"
#include "util/cmdlineargs.h"
#include "util/color/rgbcolor.h"
#include "util/fileinfo.h"
#include "util/math.h"
Expand Down Expand Up @@ -181,10 +182,15 @@ bool MixxxApplication::notify(QObject* target, QEvent* event) {
#endif

PerformanceTimer time;
time.start();
bool isDeveloper = CmdlineArgs::Instance().getDeveloper();

if (isDeveloper) {
time.start();
}

bool ret = QApplication::notify(target, event);

if (time.elapsed() > kEventNotifyExecTimeWarningThreshold) {
if (isDeveloper && time.elapsed() > kEventNotifyExecTimeWarningThreshold) {
qDebug() << "Processing event type"
<< event->type()
<< "for object"
Expand Down

0 comments on commit 2e7901b

Please sign in to comment.