From 27b84ed363fd7fc52092e3c2d1e49dca079b7ffd Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sat, 03 Jan 2004 18:33:43 +0000 Subject: slightly improve the speed reading the manufacturers list --- (limited to 'libopie2/opienet') diff --git a/libopie2/opienet/omanufacturerdb.cpp b/libopie2/opienet/omanufacturerdb.cpp index 595633d..f61270b 100644 --- a/libopie2/opienet/omanufacturerdb.cpp +++ b/libopie2/opienet/omanufacturerdb.cpp @@ -82,6 +82,9 @@ OManufacturerDB::OManufacturerDB() QString addr; QString manu; QString extManu; + #ifdef OPIE_IMPROVE_GUI_LATENCY + int counter = 0; + #endif while (!s.atEnd()) { s >> addr; @@ -90,11 +93,17 @@ OManufacturerDB::OManufacturerDB() manufacturers.insert( addr, manu ); manufacturersExt.insert( addr, extManu ); - odebug << "OmanufacturerDB: parse '" << addr << "' as '" << manu << "' (" << extManu << ")" << oendl; + // odebug << "OmanufacturerDB: parse '" << addr << "' as '" << manu << "' (" << extManu << ")" << oendl; #ifdef OPIE_IMPROVE_GUI_LATENCY - if ( qApp ) qApp->processEvents(); + counter++; + if ( counter == 50 ) + { + qApp->processEvents(); + counter = 0; + } #endif } + odebug << "OManufacturerDB: manufacturer list completed." << oendl; } } -- cgit v0.9.0.2