diff options
author | Charles.Lee <cheoljoo@gmail.com> | 2018-08-27 03:14:55 (GMT) |
---|---|---|
committer | Charles.Lee <cheoljoo@gmail.com> | 2018-08-27 03:14:55 (GMT) |
commit | 1a9bb0614362217143d8e01779d8ac9b336b96f4 (patch) | |
tree | 36ec658ef5ab1530ea8d4a18fb6f7b7c8cafe656 /src/plantuml.h | |
parent | 94a52469b177703d3e0d94bed6c4a48bddba18cb (diff) | |
download | Doxygen-1a9bb0614362217143d8e01779d8ac9b336b96f4.zip Doxygen-1a9bb0614362217143d8e01779d8ac9b336b96f4.tar.gz Doxygen-1a9bb0614362217143d8e01779d8ac9b336b96f4.tar.bz2 |
Imporvement of performance : Reduce the Java running count
# What is it
- #6465 is the first reqeust. So I followed up the albert advice.
- in case of debug you use printf statements, I think that here there better options would be
- create an -d flag (e.g. -d plantuml) that gives the information, so no need for using the configuration option
- Follow up : create -d plantuml [debug.h, debug.cpp]
- usage of printf
- printf should not be used,all output is steered over calls to routines as defined in message.cpp,
- Follow up : use Debug::Print(Debug::Plantuml, ... and msg()
- usage of std::string / std::map
- in doxygen the string manipulation is. mostly, done by means of Qt classes (e.g. classes QCString, QString). For consistency these classes should be used.
- map manipulation is also done by means of Qt classes (dictionary and list classes)
- Follow up : use QDict QList QCString [plantuml.h, plantuml.cpp]
- dirent / opendir /readdir
- when browsing through directories the routines line readFileOrDirectory should probably be used or the techniques used in this routine
- Follow up : I will follow when I try to reduce redundancy of creating plantuml image.
- Run java minimally
- Test Case : 4 plantuml
- Original Run without PLANTUML_RUN_JAVA_ONCE
- 8.2 sec = 4 times * ( 1.6(java vm) + 0.1 * 1(load multiple file) + process each plantuml (0.35) *1 ) <- prediction
- New with PLANTUML_RUN_JAVA_ONCE
- 3.499 sec = 1.6(java vm) + 0.1 * 4(load multiple file) + process each plantuml (0.35) *4 <- prediction
- Creating Java Virtual Machine has a big portion.
- Result
- Improving Performance : 8.2 -> 3.499 (in case of 4 plantuml)
# Configuration
- add configuration value in Doxyfile
- PLANTUML_RUN_JAVA_ONCE = YES
# Debugging
- doxygen -d plantuml
- doxygen -d time -d plantuml
# Tested with following options
- source code of 3 plantuml
- PLANTUML_RUN_JAVA_ONCE = YES or NO
- DOT_IMAGE_FORMAT = png or svg
- DOT_CLEANUP = YES or NO
- -d plantuml
Diffstat (limited to 'src/plantuml.h')
-rw-r--r-- | src/plantuml.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/plantuml.h b/src/plantuml.h index 54ab8a2..b931e70 100644 --- a/src/plantuml.h +++ b/src/plantuml.h @@ -16,6 +16,9 @@ #ifndef PLANTUML_H #define PLANTUML_H +#include <qdict.h> +#include <qlist.h> + class QCString; /** Plant UML output image formats */ @@ -36,5 +39,24 @@ QCString writePlantUMLSource(const QCString &outDir,const QCString &fileName,con */ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutputFormat format); +/** Singleton that manages plantuml relation actions */ +class PlantumlManager +{ + public: + static PlantumlManager *instance(); + void run(); + void insert(const QCString key , const QCString value,PlantUMLOutputFormat format); + private: + PlantumlManager(); + virtual ~PlantumlManager(); + void addPlantumlFiles(QDict< QList <QCString> > &PlantumlFiles,const QCString key , const QCString value); + void print(QDict< QList <QCString> > &PlantumlFiles); + void runPlantumlFiles(QDict< QList <QCString> > &PlantumlFiles,const char *type); + static PlantumlManager *m_theInstance; + QDict< QList<QCString> > m_pngPlantumlFiles; + QDict< QList<QCString> > m_svgPlantumlFiles; + QDict< QList<QCString> > m_epsPlantumlFiles; +}; + #endif |