diff options
author | Martin Smith <martin.smith@digia.com> | 2014-10-01 11:48:29 +0200 |
---|---|---|
committer | Martin Smith <martin.smith@digia.com> | 2014-10-17 10:42:56 +0200 |
commit | 77165553af2e541ca01ec6bf47461ba910d9519b (patch) | |
tree | 758ded5c640807938800f2efde7d6165b1227b83 /src/tools/qdoc/codeparser.cpp | |
parent | 880986be2357a1f80827d038d770dc2f80300201 (diff) |
qdoc: qdoc was too slow
The hard-coded search order is now removed. The search order
is now constructed from the depends variable in the qdocconf
file.
The basic idea is that qdoc is run once. It gets a list of all the
qdocconf files for the modules in Qt5.
First, qdoc runs in -prepare mode for each qdocconf file in the list. It
generates the index file for each module, but these index files are
never used. At the end of the -prepare phase for each module, qdoc keeps
the tree structure for the module in a collection of trees.
Second, qdoc runs in -generate mode for each qdocconf file in the list.
But now it uses the existing tree for that module, so it doesn't have to
read the sources files again, and it doesn't have to read any index
files. Now it generates the docs for each module.
The runtime for qdoc has been reduced
by 90% when running qdoc for all of Qt5 on a not so new iMac.
Before this update, qdoc took about 10 minutes to generate
docs for Qt5. Now it takes a little over 1 minute. The new
way to run qdoc is described in the Qt bug report referenced
here.
Note that running qdoc this new (old) way also generates
fewer qdoc errors than when running qdoc the old way. This
indicates that the index files qdoc uses when running the
old way are incomplete.
Note also that the old way of running qdoc is not affected
by this update. The old way is still required for running
qdoc in the current qmake/make system. That process must be
changed to be able to use the faster qdoc. The details are
provided in the Qt bug report.
Change-Id: Ibec41d6fbaa9fc8cd070a05d04357bd02c4478f0
Task-number: QTBUG-41705
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src/tools/qdoc/codeparser.cpp')
-rw-r--r-- | src/tools/qdoc/codeparser.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tools/qdoc/codeparser.cpp b/src/tools/qdoc/codeparser.cpp index 00341940da..acb297d5f9 100644 --- a/src/tools/qdoc/codeparser.cpp +++ b/src/tools/qdoc/codeparser.cpp @@ -65,9 +65,9 @@ QT_BEGIN_NAMESPACE #define COMMAND_TITLE Doc::alias(QLatin1String("title")) #define COMMAND_WRAPPER Doc::alias(QLatin1String("wrapper")) -QString CodeParser::currentSubDir_; QList<CodeParser *> CodeParser::parsers; -bool CodeParser::showInternal = false; +bool CodeParser::showInternal_ = false; +bool CodeParser::singleExec_ = false; /*! The constructor adds this code parser to the static @@ -93,7 +93,8 @@ CodeParser::~CodeParser() */ void CodeParser::initializeParser(const Config& config) { - showInternal = config.getBool(CONFIG_SHOWINTERNAL); + showInternal_ = config.getBool(CONFIG_SHOWINTERNAL); + singleExec_ = config.getBool(CONFIG_SINGLEEXEC); } /*! @@ -262,7 +263,7 @@ void CodeParser::processCommonMetaCommand(const Location& location, node->setStatus(Node::Preliminary); } else if (command == COMMAND_INTERNAL) { - if (!showInternal) { + if (!showInternal_) { node->setAccess(Node::Private); node->setStatus(Node::Internal); if (node->type() == Node::QmlPropertyGroup) { |