From c7a88a8fe29bd5bea22f5aa83175eebd20247125 Mon Sep 17 00:00:00 2001 From: "Charles.Lee" Date: Fri, 28 Dec 2018 16:12:52 +0900 Subject: # Introduction - this is doxygen documents. - draw the plantuml # Explanation how to process for FAST plantuml ```puml @startuml folder config.xml { artifact PLANTUML_RUN_FAST folder config.xml [ artifact xml ==== and style ] } folder debug.cpp { artifact "Debug::Plantuml" folder debug.h { artifact "Plantuml=0x4000" } } config.xml -down-> debug.cpp debug.cpp -down-> docvisitor.cpp folder docvisitor.cpp { folder writePlantUMLSource { folder writePlantUMLSource.old [ write plantuml file (inline_umlgraph_#.pu) ---- writePlantUMLFile() generatePlantUMLOutput() ] folder writePlantUMLSource.new [ write plantuml file (inline_umlgraph_#) writePlantUMLFile() generatePlantUMLOutput() ---- add PUML_Type as arguments PlantumlManager::instance()->insert(generateType,puName,format,text); ] writePlantUMLSource -down-> writePlantUMLSource.old : Original writePlantUMLSource -down-> writePlantUMLSource.new : PLANTUML_RUN_FAST } artifact docbookvisitor.cpp artifact htmldocvisitor.cpp artifact latexdocvisitor.cpp artifact rtfdocvisitor.cpp artifact vhdldocgen.cpp } database PlantumlManager.DB [ static PlantumlManager *m_theInstance; QDict< QList > m_pngPlantumlFiles; QDict< QList > m_svgPlantumlFiles; QDict< QList > m_epsPlantumlFiles; QDict< QCString > m_pngPlantumlContent; QDict< QCString > m_svgPlantumlContent; QDict< QCString > m_epsPlantumlContent; ] writePlantUMLSource.new -down-> PlantumlManager.DB : PLANTUML_RUN_FAST folder plantuml.cpp { folder generatePlantUMLOutput.old [ run java for each inline_umlgraph_#.pu ] folder generatePlantUMLOutput.new [ No run java for run once at the end of process Just add image into list ] writePlantUMLSource.old -down-> generatePlantUMLOutput.old : original writePlantUMLSource.new -down-> generatePlantUMLOutput.new : PLANTUML_RUN_FAST } folder doxygen.cpp { folder plantuml.h [ class PlantumlManager ] } folder plantuml.cpp { folder PlantumlManager_run [ PlantumlManager::instance()->run(); - run java once at the last time of doxygen process like drawing dot graph - read a inline_umlgraph_cache.pu - if exist , reuse it. - if not exist , add inline_umlgraph_type.pu - save all plantuml into inline_umlgraph_cache.pu for caching or reusing next time. - When we make inline_umlgraph_type.pu , we divide into 4 files for multi-processing. - But , prcessing image count is less than 8 , we will use only one file. ] } plantuml.h -down-> writePlantUMLSource : PLANTUML_RUN_FAST PlantumlManager.DB -down-> PlantumlManager_run : PLANTUML_RUN_FAST @enduml ``` ## cache - QCString m_cachePlantumlAllContent; // = fileToString = readInputFile // findScopePattern // QCString.find contains - instance() -> read cache file - writePlantULMSource() -> compare the text with cache contents - if matched , pass. - if not matched , add it. - add text to current plantuml - run() -> save current plantuml into cache file ## todo list - done - html example - cache - ing - multiple thread : divide into several files before running java. (already know the count) - epstopdf run : change the code like the java run --- src/plantuml.cpp | 140 ++++++++++++++++++++++++++++++++++++++++++------------- src/plantuml.h | 10 +++- 2 files changed, 115 insertions(+), 35 deletions(-) diff --git a/src/plantuml.cpp b/src/plantuml.cpp index c6ab7af..53f6125 100644 --- a/src/plantuml.cpp +++ b/src/plantuml.cpp @@ -14,6 +14,7 @@ */ #include "plantuml.h" +#include "util.h" #include "portable.h" #include "config.h" #include "doxygen.h" @@ -85,6 +86,7 @@ QCString writePlantUMLSource(const QCString &outDir,const QCString &fileName,con QCString generateType(qcOutDir.right(qcOutDir.length() - (pos + 1)) ); Debug::print(Debug::Plantuml,0,"*** %s generateType: %s\n","writePlantUMLSource",qPrint(generateType)); PlantumlManager::instance()->insert(generateType,puName,format,text); + Debug::print(Debug::Plantuml,0,"*** %s generateType: %s\n","writePlantUMLSource",qPrint(generateType)); } return baseName; @@ -162,8 +164,8 @@ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutp pumlArgs+="-charset UTF-8 "; int exitCode; msg("Running PlantUML on generated file %s.pu\n",baseName); - portable_sysTimerStart(); if(!Config_getBool(PLANTUML_RUN_FAST)){ // ! Config_getBool(PLANTUML_RUN_FAST) + portable_sysTimerStart(); Debug::print(Debug::Plantuml,0,"*** running: %s %s outDir:%s %s\n",qPrint(pumlExe),qPrint(pumlArgs),outDir,baseName); if ((exitCode=portable_system(pumlExe,pumlArgs,TRUE))!=0) { @@ -174,19 +176,21 @@ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutp { QFile(QCString(baseName)+".pu").remove(); } - } - portable_sysTimerStop(); - if ( (format==PUML_EPS) && (Config_getBool(USE_PDFLATEX)) ) - { - QCString epstopdfArgs(maxCmdLine); - epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",baseName,baseName); - portable_sysTimerStart(); - if ((exitCode=portable_system("epstopdf",epstopdfArgs))!=0) + portable_sysTimerStop(); + + if ( (format==PUML_EPS) && (Config_getBool(USE_PDFLATEX)) ) { - err("Problems running epstopdf. Check your TeX installation! Exit code: %d\n",exitCode); + QCString epstopdfArgs(maxCmdLine); + epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",baseName,baseName); + portable_sysTimerStart(); + if ((exitCode=portable_system("epstopdf",epstopdfArgs))!=0) + { + err("Problems running epstopdf. Check your TeX installation! Exit code: %d\n",exitCode); + } + portable_sysTimerStop(); } - portable_sysTimerStop(); } + Doxygen::indexList->addImageFile(imgName); } @@ -199,6 +203,17 @@ PlantumlManager *PlantumlManager::instance() if (!m_theInstance) { m_theInstance = new PlantumlManager; + QCString outputFilename = Config_getString(OUTPUT_DIRECTORY) + "/" + CACHE_FILENAME; + QFileInfo fi(outputFilename); + if (fi.exists()) { + m_theInstance->m_cachedPlantumlAllContent = fileToString(outputFilename); + } else { + m_theInstance->m_cachedPlantumlAllContent = ""; + } + Debug::print(Debug::Plantuml,0,"*** instance() : m_cachedPlantumlAllContent = [%s]\n",qPrint(m_theInstance->m_cachedPlantumlAllContent)); + m_theInstance->m_pngPlantumlContent.clear(); + m_theInstance->m_svgPlantumlContent.clear(); + m_theInstance->m_epsPlantumlContent.clear(); } return m_theInstance; } @@ -241,7 +256,7 @@ PlantumlManager::~PlantumlManager() } } -void PlantumlManager::runPlantumlContent(QDict< QList > &PlantumlFiles,QDict< QCString > &PlantumlContent, const char *type) +void PlantumlManager::runPlantumlContent(QDict< QList > &PlantumlFiles,QDict< QCString > &PlantumlContent,PlantUMLOutputFormat format ) { /* example : running: java -Djava.awt.headless=true -jar "/Users/cheoljoo/code/common_telltale/GP/Apps/Src/MgrTelltale/tools/plantuml.jar" -o "/Users/cheoljoo/Code/LG/test_doxygen/DOXYGEN_OUTPUT/html" -tpng "/Users/cheoljoo/Code/LG/test_doxygen/DOXYGEN_OUTPUT/html/A.pu" -charset UTF-8 outDir:/Users/cheoljoo/Code/LG/test_doxygen/DOXYGEN_OUTPUT/html /Users/cheoljoo/Code/LG/test_doxygen/DOXYGEN_OUTPUT/html/A */ @@ -252,6 +267,8 @@ void PlantumlManager::runPlantumlContent(QDict< QList > &PlantumlFile QCString pumlExe = "java"; QCString pumlArgs = ""; + QCString pumlType = ""; + QCString pumlOutDir = ""; QStrList &pumlIncludePathList = Config_getList(PLANTUML_INCLUDE_PATH); char *s=pumlIncludePathList.first(); @@ -283,6 +300,18 @@ void PlantumlManager::runPlantumlContent(QDict< QList > &PlantumlFile pumlArgs += portable_commandExtension(); pumlArgs += "\" "; } + switch (format) + { + case PUML_BITMAP: + pumlType="png"; + break; + case PUML_EPS: + pumlType="eps"; + break; + case PUML_SVG: + pumlType="svg"; + break; + } { QDictIterator< QCString > it( PlantumlContent); // See QDictIterator @@ -290,14 +319,17 @@ void PlantumlManager::runPlantumlContent(QDict< QList > &PlantumlFile for (it.toFirst();(nb=it.current());++it) { QCString pumlArguments(pumlArgs); - msg("Running PlantUML on png PlantumlFiles in %s\n",qPrint(it.currentKey())); + msg("Running PlantUML on %s PlantumlFiles in %s\n",qPrint(pumlType),qPrint(it.currentKey())); + QList *list = PlantumlFiles[it.currentKey()]; + Debug::print(Debug::Plantuml,0,"*** %s PlantumlFiles key:%s size:%d\n","PlantumlManager::print Files",qPrint(it.currentKey()),(*list).count()); + QListIterator li(*list); pumlArguments+="-o \""; pumlArguments+=Config_getString(OUTPUT_DIRECTORY); pumlArguments+="/"; pumlArguments+=it.currentKey(); pumlArguments+="\" "; pumlArguments+="-charset UTF-8 -t"; - pumlArguments+=type; + pumlArguments+=pumlType; pumlArguments+=" "; QCString puFileName(""); @@ -305,8 +337,9 @@ void PlantumlManager::runPlantumlContent(QDict< QList > &PlantumlFile puFileName+="/"; puFileName+=it.currentKey(); puFileName+="/"; + pumlOutDir=puFileName; puFileName+="inline_umlgraph_"; - puFileName+=type; + puFileName+=pumlType; puFileName+=it.currentKey(); puFileName+=".pu"; @@ -322,6 +355,8 @@ void PlantumlManager::runPlantumlContent(QDict< QList > &PlantumlFile file.writeBlock( *nb, nb->length() ); file.close(); Debug::print(Debug::Plantuml,0,"*** %s Running Plantuml arguments:%s\n","PlantumlManager::runPlantumlContent",qPrint(pumlArguments)); + + portable_sysTimerStart(); if ((exitCode=portable_system(pumlExe,pumlArguments,TRUE))!=0) { err("Problems running PlantUML. Verify that the command 'java -jar \"%splantuml.jar\" -h' works from the command line. Exit code: %d\n", @@ -329,42 +364,70 @@ void PlantumlManager::runPlantumlContent(QDict< QList > &PlantumlFile } else if (Config_getBool(DOT_CLEANUP)) { - file.remove(); + file.remove(); + } + portable_sysTimerStop(); + + if ( (format==PUML_EPS) && (Config_getBool(USE_PDFLATEX)) ) + { + Debug::print(Debug::Plantuml,0,"*** %s Running epstopdf\n","PlantumlManager::runPlantumlContent"); + QList *list = PlantumlFiles[it.currentKey()]; + QListIterator li(*list); + QCString *nb; + for (li.toFirst();(nb=li.current());++li) + { + QCString epstopdfArgs(maxCmdLine); + epstopdfArgs.sprintf("\"%s%s.eps\" --outfile=\"%s%s.pdf\"",qPrint(pumlOutDir),qPrint(*nb),qPrint(pumlOutDir),qPrint(*nb)); + portable_sysTimerStart(); + if ((exitCode=portable_system("epstopdf",epstopdfArgs))!=0) + { + err("Problems running epstopdf. Check your TeX installation! Exit code: %d\n",exitCode); + } + portable_sysTimerStop(); + } } } } + if (Config_getBool(DOT_CLEANUP)) { + Debug::print(Debug::Plantuml,0,"*** %s Remove pu files\n","PlantumlManager::runPlantumlContent"); QDictIterator< QList > it( PlantumlFiles); // See QDictIterator QList *list; for (it.toFirst();(list=it.current());++it) { QListIterator li(*list); QCString *nb; - if (Config_getBool(DOT_CLEANUP)) + for (li.toFirst();(nb=li.current());++li) { - for (li.toFirst();(nb=li.current());++li) - { - QCString pumlName = ""; - pumlName+=Config_getString(OUTPUT_DIRECTORY); - pumlName+="/"; - pumlName+=it.currentKey(); - pumlName+="/"; - pumlName+=*nb; - pumlName+=".pu"; - QFile(pumlName).remove(); - } + QCString pumlName = ""; + pumlName+=Config_getString(OUTPUT_DIRECTORY); + pumlName+="/"; + pumlName+=it.currentKey(); + pumlName+="/"; + pumlName+=*nb; + pumlName+=".pu"; + QFile(pumlName).remove(); } } } + } void PlantumlManager::run() { Debug::print(Debug::Plantuml,0,"*** %s\n","PlantumlManager::run"); - runPlantumlContent(m_pngPlantumlFiles, m_pngPlantumlContent, "png"); - runPlantumlContent(m_svgPlantumlFiles, m_svgPlantumlContent, "svg"); - runPlantumlContent(m_epsPlantumlFiles, m_epsPlantumlContent, "eps"); + runPlantumlContent(m_pngPlantumlFiles, m_pngPlantumlContent, PUML_BITMAP); + runPlantumlContent(m_svgPlantumlFiles, m_svgPlantumlContent, PUML_SVG); + runPlantumlContent(m_epsPlantumlFiles, m_epsPlantumlContent, PUML_EPS); + QCString outputFilename = Config_getString(OUTPUT_DIRECTORY) + "/" + CACHE_FILENAME; + QFile file(outputFilename); + if (!file.open(IO_WriteOnly)) + { + err("Could not open file %s for writing\n",CACHE_FILENAME); + } + file.writeBlock( m_currentPlantumlAllContent, m_currentPlantumlAllContent.length() ); + file.close(); } void PlantumlManager::print(QDict< QList > &PlantumlFiles) @@ -374,7 +437,7 @@ void PlantumlManager::print(QDict< QList > &PlantumlFiles) QList *list; for (it.toFirst();(list=it.current());++it) { - Debug::print(Debug::Plantuml,0,"*** %s PlantumlFiles key:%s\n","PlantumlManager::print",qPrint(it.currentKey())); + Debug::print(Debug::Plantuml,0,"*** %s PlantumlFiles key:%s size:%d\n","PlantumlManager::print Files",qPrint(it.currentKey()),(*list).count()); QListIterator li(*list); QCString *nb; for (li.toFirst();(nb=li.current());++li) @@ -392,7 +455,7 @@ void PlantumlManager::print(QDict &PlantumlContent) QCString *nb; for (it.toFirst();(nb=it.current());++it) { - Debug::print(Debug::Plantuml,0,"*** %s PlantumlContent key:%s\n","PlantumlManager::print",qPrint(it.currentKey())); + Debug::print(Debug::Plantuml,0,"*** %s PlantumlContent key:%s\n","PlantumlManager::print Content",qPrint(it.currentKey())); Debug::print(Debug::Plantuml,0,"*** %s Content :%s\n","PlantumlManager::print",qPrint(*nb)); } } @@ -421,7 +484,18 @@ void PlantumlManager::addPlantumlContent(QDict< QCString > &PlantumlContent,cons void PlantumlManager::insert(const QCString key , const QCString value, PlantUMLOutputFormat format,const QCString &puContent) { + int find; + Debug::print(Debug::Plantuml,0,"*** %s key:%s ,value:%s\n","PlantumlManager::insert",qPrint(key),qPrint(value)); + + m_currentPlantumlAllContent+=puContent; + + find = m_cachedPlantumlAllContent.find(puContent); + Debug::print(Debug::Plantuml,0,"*** %s find: %d\n","PlantumlManager::addPlantumlContent",find); + if(find >=0){ // matched in cache. so we skip to run java for this plantuml + return ; + } + switch (format) { case PUML_BITMAP: diff --git a/src/plantuml.h b/src/plantuml.h index 815bca9..0f256d2 100644 --- a/src/plantuml.h +++ b/src/plantuml.h @@ -19,6 +19,10 @@ #include #include +#define CACHE_FILENAME "inline_umlgraph_cache_all.pu" +#define DIVIDE_COUNT 4 +#define MIN_PLANTUML_COUNT 8 + class QCString; /** Plant UML output image formats */ @@ -54,14 +58,16 @@ class PlantumlManager void print(QDict< QList > &PlantumlFiles); void addPlantumlContent(QDict< QCString > &PlantumlContent,const QCString key , const QCString &puContent); void print(QDict< QCString > &PlantumlContent); - void runPlantumlContent(QDict< QList > &PlantumlFiles,QDict< QCString > &PlantumlContent, const char *type); + void runPlantumlContent(QDict< QList > &PlantumlFiles,QDict< QCString > &PlantumlContent, PlantUMLOutputFormat format); static PlantumlManager *m_theInstance; QDict< QList > m_pngPlantumlFiles; QDict< QList > m_svgPlantumlFiles; QDict< QList > m_epsPlantumlFiles; - QDict< QCString > m_pngPlantumlContent; + QDict< QCString > m_pngPlantumlContent; // use circular queue for using multi-proecessor (multi threading) QDict< QCString > m_svgPlantumlContent; QDict< QCString > m_epsPlantumlContent; + QCString m_cachedPlantumlAllContent; // read from CACHE_FILENAME file + QCString m_currentPlantumlAllContent; // processing plantuml then write it into CACHE_FILENAME to reuse the next time as cache information }; #endif -- cgit v0.12 From f002c2c53e2db568ff467e8bb037fcc761f90a26 Mon Sep 17 00:00:00 2001 From: "Charles.Lee" Date: Tue, 1 Jan 2019 17:51:16 +0900 Subject: Fast Plantuml # Test Result The example has 5 plantumls. | Test Type | Original | PLANTUML_RUN_FAST | Modify One Plantuml | |---------------------------|------------|-------------|-----------------| | Elapsed Time | 23.370 sec | 7.349 sec | 4.652 sec | | external tools Time | 23.020 sec | 6.819 sec | 4.301 sec | # Test Environments (How to test) - The example has 5 plantumls. ## Original Configration - I follow the original path to process plantuml. - Configuration of Doxyfile - OUTPUT_DIRECTORY = OUTPUT - SOURCE_BROWSER = YES - GENERATE_HTML = YES only set the html - GENERATE_LATEX = NO - Run - $ doxygen -d time ## PLANTUML_RUN_FAST - Changed Configuration of Doxyfile - PLANTUML_RUN_FAST = YES ## Modify One Plantuml - Modify one plantuml in 5 plantuml of example with the same environment of PLANTUML_RUN_TEST # How to Reduce the performance ## PLANTUML_RUN_FAST - Make Just one pu (plantuml) file to run java once - Just run once when we generate HTML. ### another test with setting YES to all GENERATE_* - When we generate several types , we run java several times according the different java arguments. - set YES to all GENERATE_* - There are 20 plantuml in this example and configuration. But, it runs java just 4 times. ```text Executing external command `java -Djava.awt.headless=true -jar "/Users/cheoljoo/bin/plantuml.jar" -o "/Users/cheoljoo/Code/github/doxygen/build/bin/B/OUTPUT/docbook" -charset UTF-8 -tpng "/Users/cheoljoo/Code/github/doxygen/build/bin/B/OUTPUT/docbook/inline_umlgraph_pngdocbook.pu" ` 10.019 sec: Running PlantUML on png PlantumlFiles in html Executing external command `java -Djava.awt.headless=true -jar "/Users/cheoljoo/bin/plantuml.jar" -o "/Users/cheoljoo/Code/github/doxygen/build/bin/B/OUTPUT/html" -charset UTF-8 -tpng "/Users/cheoljoo/Code/github/doxygen/build/bin/B/OUTPUT/html/inline_umlgraph_pnghtml.pu" ` 17.906 sec: Running PlantUML on png PlantumlFiles in rtf Executing external command `java -Djava.awt.headless=true -jar "/Users/cheoljoo/bin/plantuml.jar" -o "/Users/cheoljoo/Code/github/doxygen/build/bin/B/OUTPUT/rtf" -charset UTF-8 -tpng "/Users/cheoljoo/Code/github/doxygen/build/bin/B/OUTPUT/rtf/inline_umlgraph_pngrtf.pu" ` 25.842 sec: Running PlantUML on eps PlantumlFiles in latex Executing external command `java -Djava.awt.headless=true -jar "/Users/cheoljoo/bin/plantuml.jar" -o "/Users/cheoljoo/Code/github/doxygen/build/bin/B/OUTPUT/latex" -charset UTF-8 -teps "/Users/cheoljoo/Code/github/doxygen/build/bin/B/OUTPUT/latex/inline_umlgraph_epslatex.pu" ` ``` ## Modify One Plantuml - Cached file name : OUTPUT_DIRECTORY/inline_umlgraph_cache_all.pu - inline_umlgraph_cache_all.pu was created when doxygen was finished. - inline_umlgraph_cache_all.pu had all plantuml contents. and it will be used to check what is changed. - If you want to keep pu files , DOT_CLEANUP = NO - inline_umlgraph_.pu includes changed plantuml. So it can reduce the java processing time. # Explanation of the code ## old - generatePlantUMLOutput() makes each plantuml from each @start~enduml with the name as inline_umlgraph_#.pu. ## new (PLANTUML_RUN_FAST) - It will make a plantuml png at the end of processes of doxygen. So we can reduce the count of java runs. - class PlantumlManager saves all plantuml information for running java at the end of doxygen and for comparing the plantuml contents as a cache. - generatePlantUMLOutput() is not enough to make a database in class PlantumlManager. - So I use writePlantUMLSource() to get more information (pu name and contents). I modified writePlantUMLSource() because I do not want to read the file to get the contents in generatePlantUMLOutput(). - The writePlantUMLSource() compares each plantuml contents and filename with cached information (inline_umlgraph_cache_all.pu). Then it will decide whether will recreate or reuse. - Like dot , we make plantuml pictures at the end of doxygen. ```puml @startuml folder config.xml { artifact PLANTUML_RUN_FAST folder config.xml [ artifact xml ==== and style ] } folder debug.cpp { artifact "Debug::Plantuml" folder debug.h { artifact "Plantuml=0x4000" } } config.xml -down-> debug.cpp debug.cpp -down-> docvisitor.cpp folder docvisitor.cpp { folder writePlantUMLSource { folder writePlantUMLSource.old [ write plantuml file (inline_umlgraph_#.pu) ---- writePlantUMLFile() generatePlantUMLOutput() ] folder writePlantUMLSource.new [ write plantuml file (inline_umlgraph_#) writePlantUMLFile() generatePlantUMLOutput() ---- add PUML_Type as arguments PlantumlManager::instance()->insert(generateType,puName,format,text); ] writePlantUMLSource -down-> writePlantUMLSource.old : Original writePlantUMLSource -down-> writePlantUMLSource.new : PLANTUML_RUN_FAST } artifact docbookvisitor.cpp artifact htmldocvisitor.cpp artifact latexdocvisitor.cpp artifact rtfdocvisitor.cpp artifact vhdldocgen.cpp } database PlantumlManager.DB [ static PlantumlManager *m_theInstance; QDict< QList > m_pngPlantumlFiles; QDict< QList > m_svgPlantumlFiles; QDict< QList > m_epsPlantumlFiles; QDict< QCString > m_pngPlantumlContent; QDict< QCString > m_svgPlantumlContent; QDict< QCString > m_epsPlantumlContent; ] writePlantUMLSource.new -down-> PlantumlManager.DB : PLANTUML_RUN_FAST folder plantuml.cpp { folder generatePlantUMLOutput.old [ run java for each inline_umlgraph_#.pu ] folder generatePlantUMLOutput.new [ No run java for run once at the end of process Just add image into list ] writePlantUMLSource.old -down-> generatePlantUMLOutput.old : original writePlantUMLSource.new -down-> generatePlantUMLOutput.new : PLANTUML_RUN_FAST } folder doxygen.cpp { folder plantuml.h [ class PlantumlManager ] } folder plantuml.cpp { folder PlantumlManager_run [ PlantumlManager::instance()->run(); - run java once at the last time of doxygen process like drawing dot graph - read a inline_umlgraph_cache.pu - if exist , reuse it. - if not exist , add inline_umlgraph_type.pu - save all plantuml into inline_umlgraph_cache_all.pu for caching or reusing next time. - When we make inline_umlgraph_type.pu , we divide into 4 files for multi-processing. - But , prcessing image count is less than 8 , we will use only one file. ] } plantuml.h -down-> writePlantUMLSource : PLANTUML_RUN_FAST PlantumlManager.DB -down-> PlantumlManager_run : PLANTUML_RUN_FAST @enduml ``` --- src/plantuml.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/plantuml.cpp b/src/plantuml.cpp index 53f6125..876bf85 100644 --- a/src/plantuml.cpp +++ b/src/plantuml.cpp @@ -370,21 +370,21 @@ void PlantumlManager::runPlantumlContent(QDict< QList > &PlantumlFile if ( (format==PUML_EPS) && (Config_getBool(USE_PDFLATEX)) ) { - Debug::print(Debug::Plantuml,0,"*** %s Running epstopdf\n","PlantumlManager::runPlantumlContent"); - QList *list = PlantumlFiles[it.currentKey()]; - QListIterator li(*list); - QCString *nb; - for (li.toFirst();(nb=li.current());++li) + Debug::print(Debug::Plantuml,0,"*** %s Running epstopdf\n","PlantumlManager::runPlantumlContent"); + QList *list = PlantumlFiles[it.currentKey()]; + QListIterator li(*list); + QCString *nb; + for (li.toFirst();(nb=li.current());++li) + { + QCString epstopdfArgs(maxCmdLine); + epstopdfArgs.sprintf("\"%s%s.eps\" --outfile=\"%s%s.pdf\"",qPrint(pumlOutDir),qPrint(*nb),qPrint(pumlOutDir),qPrint(*nb)); + portable_sysTimerStart(); + if ((exitCode=portable_system("epstopdf",epstopdfArgs))!=0) { - QCString epstopdfArgs(maxCmdLine); - epstopdfArgs.sprintf("\"%s%s.eps\" --outfile=\"%s%s.pdf\"",qPrint(pumlOutDir),qPrint(*nb),qPrint(pumlOutDir),qPrint(*nb)); - portable_sysTimerStart(); - if ((exitCode=portable_system("epstopdf",epstopdfArgs))!=0) - { - err("Problems running epstopdf. Check your TeX installation! Exit code: %d\n",exitCode); - } - portable_sysTimerStop(); + err("Problems running epstopdf. Check your TeX installation! Exit code: %d\n",exitCode); } + portable_sysTimerStop(); + } } } } -- cgit v0.12 From 51bba9d513b22bd92d90127657b76f51d4555fa8 Mon Sep 17 00:00:00 2001 From: "Charles.Lee" Date: Sun, 6 Jan 2019 17:21:10 +0900 Subject: remove PLANTUML_RUN_FAST because FAST is default. - remove PLANTUML_RUN_FAST in config.xml - Do not make plantuml (.pu) file for each plantuml script. (ex. inline_umlgraph_#.pu) But, make type plantuml files (ex. inline_umlgraph_..pu) --- src/config.xml | 10 ----- src/doxygen.cpp | 9 ++--- src/plantuml.cpp | 120 ++++--------------------------------------------------- 3 files changed, 11 insertions(+), 128 deletions(-) diff --git a/src/config.xml b/src/config.xml index e4880d4..db0f557 100644 --- a/src/config.xml +++ b/src/config.xml @@ -3536,16 +3536,6 @@ to be found in the default search path. ]]> -