Go to file
Marc Mutz 2e5b8032a2 Optimize QInotifyFileSystemWatcherEngine::getPathFromID()
The code basically wants to get the last element of equal_range(id).

The problem is that backwards iteration on QHash is very expensive,
because it's implemented as forward search with wrap-around at bucket
end.

So it was implementing its own equal_range with look-ahead. The
problem is that it compared each key in the equal_range twice: once in
the if, and once more in the following while iteration.

I expect to see this kind of algorithm more as we move away from the
fake bidirectionalism of QHash, so I decided to implement it in a
generic way. We can copy it somewhere else when we find more users.

Change-Id: I7951652107ab897f6a456035f02e0339835e078d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-07-15 13:09:37 +02:00
bin syncqt: Fix module header install target creation 2019-07-11 09:50:18 +02:00
config.tests x86: Disable AVX support on 64-bit MinGW 2019-02-06 08:11:29 +00:00
dist Merge remote-tracking branch 'origin/5.12' into 5.13 2019-06-20 07:50:44 +02:00
doc Introduce Q_NAMESPACE_EXPORT 2019-06-28 06:47:29 +02:00
examples Remove usages of deprecated APIs of qtbase/gui 2019-07-13 10:43:15 +02:00
lib
mkspecs Merge remote-tracking branch 'origin/5.13' into dev 2019-07-12 01:00:42 +02:00
qmake QMake: fix GCC 9 -Wdeprecated-copy warnings 2019-07-15 12:11:31 +02:00
src Optimize QInotifyFileSystemWatcherEngine::getPathFromID() 2019-07-15 13:09:37 +02:00
tests QNetworkRequest: make the default ctor implicit 2019-07-15 13:07:10 +02:00
util Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
.gitattributes
.gitignore qfloat16: Check in the tables to Git 2019-06-03 10:42:53 -07:00
.qmake.conf Introduce QT_NO_LINKED_LIST and mark QtBase (almost) free of it 2019-07-12 14:26:30 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
config_help.txt Add -qtlibinfix-plugins for renaming Qt plugins according to QT_LIBINFIX 2019-05-16 06:22:25 +00:00
configure configure: Treat win32-clang-g++ the same as win32-g++ 2018-10-10 04:10:40 +00:00
configure.bat Configure: simplify logic 2019-03-14 12:13:58 +00:00
configure.json Merge remote-tracking branch 'origin/5.12' into 5.13 2019-06-25 15:47:42 +02:00
configure.pri Add qmake support for c++2a 2019-04-19 08:14:25 +00:00
header.BSD Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.FDL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL-EXCEPT Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3-COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-NOGPL2 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-ONLY Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.MIT qsimd: add support for new x86 CPU features 2018-05-05 06:20:07 +00:00
INSTALL INSTALL: Remove outdated reference to Windows CE 2019-02-13 13:01:57 +00:00
LICENSE.FDL
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.QT-LICENSE-AGREEMENT-4.0 Replace commercial preview license with Qt License Agreement 4.0 2018-06-21 11:39:15 +00:00
qtbase.pro nuke configure -host-option 2016-12-13 18:55:59 +00:00
sync.profile platformsupport/input: add xkbcommon utilities lib 2019-03-01 14:31:28 +00:00