[AdBlock] Improved performance of loading rules
Don't use regexps for parsing rules.
Added benchmark for loading subscriptions
Before:
********* Start testing of AdBlockParseRule *********
Config: Using QTest library 4.8.6, Qt 4.8.6
PASS : AdBlockParseRule::initTestCase()
RESULT : AdBlockParseRule::parseEasyList():
596.3 msecs per iteration (total: 2,982, iterations: 5)
PASS : AdBlockParseRule::parseEasyList()
PASS : AdBlockParseRule::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of AdBlockParseRule *********
After:
********* Start testing of AdBlockParseRule *********
Config: Using QTest library 4.8.6, Qt 4.8.6
PASS : AdBlockParseRule::initTestCase()
RESULT : AdBlockParseRule::parseEasyList():
481.8 msecs per iteration (total: 2,409, iterations: 5)
PASS : AdBlockParseRule::parseEasyList()
PASS : AdBlockParseRule::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of AdBlockParseRule *********
2014-04-06 13:34:01 +02:00
|
|
|
include($$PWD/../../src/defines.pri)
|
|
|
|
|
2015-05-25 10:39:39 +02:00
|
|
|
QT += webenginewidgets network widgets printsupport sql script testlib
|
2013-01-24 14:25:26 +01:00
|
|
|
|
|
|
|
TARGET = autotests
|
|
|
|
|
|
|
|
!unix|mac: LIBS += -L$$PWD/../../bin -lQupZilla
|
|
|
|
!mac:unix: LIBS += $$PWD/../../bin/libQupZilla.so
|
|
|
|
|
2014-04-13 10:47:04 +02:00
|
|
|
QMAKE_LFLAGS+=$${QMAKE_LFLAGS_RPATH}$$PWD/../../bin
|
2013-01-24 14:25:26 +01:00
|
|
|
|
2014-02-01 17:22:55 +01:00
|
|
|
# KWallet plugin
|
2014-09-19 13:22:27 +02:00
|
|
|
exists($$PWD/../../bin/plugins/libKWalletPasswords.so) {
|
|
|
|
isEqual(QT_MAJOR_VERSION, 4) | qtHaveModule(KWallet) {
|
|
|
|
LIBS += $$PWD/../../bin/plugins/libKWalletPasswords.so
|
|
|
|
DEFINES += HAVE_KDE_PASSWORDS_PLUGIN
|
|
|
|
}
|
2014-02-01 17:22:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
# GnomeKeyring plugin
|
|
|
|
exists($$PWD/../../bin/plugins/libGnomeKeyringPasswords.so) {
|
|
|
|
LIBS += $$PWD/../../bin/plugins/libGnomeKeyringPasswords.so
|
|
|
|
DEFINES += HAVE_GNOME_PASSWORDS_PLUGIN
|
|
|
|
}
|
|
|
|
|
2014-09-19 13:22:27 +02:00
|
|
|
DESTDIR =
|
2013-01-24 14:25:26 +01:00
|
|
|
OBJECTS_DIR = build
|
|
|
|
MOC_DIR = build
|
|
|
|
RCC_DIR = build
|
|
|
|
UI_DIR = build
|
|
|
|
|
2014-03-31 14:54:08 +02:00
|
|
|
INCLUDEPATH += $$PWD/../../src/lib/3rdparty \
|
|
|
|
$$PWD/../../src/lib/adblock \
|
|
|
|
$$PWD/../../src/lib/app \
|
|
|
|
$$PWD/../../src/lib/autofill \
|
|
|
|
$$PWD/../../src/lib/bookmarks \
|
|
|
|
$$PWD/../../src/lib/cookies \
|
|
|
|
$$PWD/../../src/lib/downloads \
|
|
|
|
$$PWD/../../src/lib/history \
|
|
|
|
$$PWD/../../src/lib/navigation \
|
|
|
|
$$PWD/../../src/lib/network \
|
|
|
|
$$PWD/../../src/lib/notifications \
|
|
|
|
$$PWD/../../src/lib/opensearch \
|
|
|
|
$$PWD/../../src/lib/other \
|
|
|
|
$$PWD/../../src/lib/plugins \
|
|
|
|
$$PWD/../../src/lib/popupwindow \
|
|
|
|
$$PWD/../../src/lib/preferences \
|
|
|
|
$$PWD/../../src/lib/rss \
|
|
|
|
$$PWD/../../src/lib/session \
|
|
|
|
$$PWD/../../src/lib/sidebar \
|
|
|
|
$$PWD/../../src/lib/tabwidget \
|
|
|
|
$$PWD/../../src/lib/tools \
|
2015-08-28 16:11:58 +02:00
|
|
|
$$PWD/../../src/lib/webengine \
|
2014-03-31 14:54:08 +02:00
|
|
|
$$PWD/../../src/lib/webtab \
|
2013-01-24 14:25:26 +01:00
|
|
|
|
|
|
|
HEADERS += \
|
2013-01-25 16:59:42 +01:00
|
|
|
qztoolstest.h \
|
2013-02-01 14:45:42 +01:00
|
|
|
formcompletertest.h \
|
2013-02-04 22:48:34 +01:00
|
|
|
cookiestest.h \
|
2013-02-26 15:48:47 +01:00
|
|
|
downloadstest.h \
|
2013-03-17 10:26:47 +01:00
|
|
|
adblocktest.h \
|
2013-03-29 19:22:55 +01:00
|
|
|
updatertest.h \
|
2013-05-21 13:37:40 +02:00
|
|
|
pactest.h \
|
2014-02-01 22:06:17 +01:00
|
|
|
passwordbackendtest.h \
|
|
|
|
networktest.h
|
2013-01-24 14:25:26 +01:00
|
|
|
|
|
|
|
SOURCES += \
|
|
|
|
qztoolstest.cpp \
|
2013-01-25 16:59:42 +01:00
|
|
|
main.cpp \
|
2013-02-01 14:45:42 +01:00
|
|
|
formcompletertest.cpp \
|
2013-02-04 22:48:34 +01:00
|
|
|
cookiestest.cpp \
|
2013-02-26 15:48:47 +01:00
|
|
|
downloadstest.cpp \
|
2013-03-17 10:26:47 +01:00
|
|
|
adblocktest.cpp \
|
2013-03-29 19:22:55 +01:00
|
|
|
updatertest.cpp \
|
2013-05-21 13:37:40 +02:00
|
|
|
pactest.cpp \
|
2014-02-01 22:06:17 +01:00
|
|
|
passwordbackendtest.cpp \
|
|
|
|
networktest.cpp
|