Commit fcfa0052 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[FIX #283] enormous amounts of debug logs tremendously slowed down the GUI....

[FIX #283] enormous amounts of debug logs tremendously slowed down the GUI. Disabled debug logs in the GUI message dock completely.
parent 833e6154
......@@ -299,8 +299,10 @@ void WQt4Gui::slotUpdateTextureSorter()
void WQt4Gui::slotAddLog( const WLogEntry& entry )
{
// emit event but the main window might not be available. Chick this.
if( m_mainWindow )
// emit event but the main window might not be available. Check this.
// NOTE: we disable debug log messages completely, since their extensive use in some modules causes SEVERE slowdown of the GUI as millions of
// events need to be handled each GUI event loop. See issue #283 for details.
if( m_mainWindow && ( entry.getLogLevel() != LL_DEBUG ) )
{
QCoreApplication::postEvent( m_mainWindow, new WLogEvent( entry ) );
}
......
......@@ -55,7 +55,7 @@ WQtMessageDock::WQtMessageDock( QString dockTitle, QWidget* parent ):
// filter list
m_filterCombo = new QComboBox();
m_filterCombo->setToolTip( "Filter the messages by level. When choosing a level, all messages with this and an above level will be displayed." );
m_filterCombo->addItem( "Debug" );
// m_filterCombo->addItem( "Debug" ); // disabled. See issue #283
m_filterCombo->addItem( "Info" );
m_filterCombo->addItem( "Warning" );
m_filterCombo->addItem( "Error" );
......@@ -105,7 +105,7 @@ void WQtMessageDock::addMessage( QString title, QString message, WQtMessagePopup
m_logList->setItemWidget( item, w );
// hide messages not matching the filter
if( type < m_filterCombo->currentIndex() )
if( type < ( m_filterCombo->currentIndex() + 1 ) )
{
item->setHidden( true );
}
......@@ -141,7 +141,7 @@ void WQtMessageDock::handleFilterUpdate()
WQtMessagePopup* popup = dynamic_cast< WQtMessagePopup* >( w );
if( popup )
{
li->setHidden( popup->getType() < m_filterCombo->currentIndex() );
li->setHidden( popup->getType() < ( m_filterCombo->currentIndex() + 1 ) );
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment