author | mickeyl <mickeyl> | 2004-01-03 18:33:43 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-01-03 18:33:43 (UTC) |
commit | 27b84ed363fd7fc52092e3c2d1e49dca079b7ffd (patch) (unidiff) | |
tree | 932806dc83d84720bcb259df8711d894932580e1 /libopie2/opienet | |
parent | 3889c8f853aa2d128f54389b17f08fc7b9150788 (diff) | |
download | opie-27b84ed363fd7fc52092e3c2d1e49dca079b7ffd.zip opie-27b84ed363fd7fc52092e3c2d1e49dca079b7ffd.tar.gz opie-27b84ed363fd7fc52092e3c2d1e49dca079b7ffd.tar.bz2 |
slightly improve the speed reading the manufacturers list
-rw-r--r-- | libopie2/opienet/omanufacturerdb.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
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() | |||
82 | QString addr; | 82 | QString addr; |
83 | QString manu; | 83 | QString manu; |
84 | QString extManu; | 84 | QString extManu; |
85 | #ifdef OPIE_IMPROVE_GUI_LATENCY | ||
86 | int counter = 0; | ||
87 | #endif | ||
85 | while (!s.atEnd()) | 88 | while (!s.atEnd()) |
86 | { | 89 | { |
87 | s >> addr; | 90 | s >> addr; |
@@ -90,11 +93,17 @@ OManufacturerDB::OManufacturerDB() | |||
90 | 93 | ||
91 | manufacturers.insert( addr, manu ); | 94 | manufacturers.insert( addr, manu ); |
92 | manufacturersExt.insert( addr, extManu ); | 95 | manufacturersExt.insert( addr, extManu ); |
93 | odebug << "OmanufacturerDB: parse '" << addr << "' as '" << manu << "' (" << extManu << ")" << oendl; | 96 | // odebug << "OmanufacturerDB: parse '" << addr << "' as '" << manu << "' (" << extManu << ")" << oendl; |
94 | #ifdef OPIE_IMPROVE_GUI_LATENCY | 97 | #ifdef OPIE_IMPROVE_GUI_LATENCY |
95 | if ( qApp ) qApp->processEvents(); | 98 | counter++; |
99 | if ( counter == 50 ) | ||
100 | { | ||
101 | qApp->processEvents(); | ||
102 | counter = 0; | ||
103 | } | ||
96 | #endif | 104 | #endif |
97 | } | 105 | } |
106 | odebug << "OManufacturerDB: manufacturer list completed." << oendl; | ||
98 | } | 107 | } |
99 | } | 108 | } |
100 | 109 | ||