summaryrefslogtreecommitdiffstats
path: root/src/plantuml.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'run_java_once_3rd_trial' of ↵Dimitri van Heesch2019-01-081-24/+33
|\ | | | | | | https://github.com/cheoljoo/doxygen into cheoljoo-run_java_once_3rd_trial
| * # IntroductionCharles.Lee2018-12-281-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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<QCString> > m_pngPlantumlFiles; QDict< QList<QCString> > m_svgPlantumlFiles; QDict< QList<QCString> > 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
* | Improved code structure a bitDimitri van Heesch2018-12-271-12/+10
|/
* Imporvement of performance : Reduce the Java running count (3rd trial)Charles.Lee2018-08-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # What is it - #6465 is the first trial. 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. - #6467 is the second trial. This is work items to satisfiy comments. - In the debug statements the __PRETTY_FUNCTION__ is a GCC extension. But this project can run in windows. - I got it. I removed __PRETTY_FUNCTION__. - In the PLANTUML_RUN_JAVA_ONCE all the .pu files are given to the plantuml.jar with their full path (see -d extcmd when running). I think this will lead to problems when there are quite a few files ("command line" overflow). Seen this merging the files into one file like done for formulas. A small test with one file revealed that it didn't bring a lot / nothing time wise, but here the problem with the "command line" overflow shouldn't / can't happen. - Yes. The command line has overflow problem. So I change into one file. - I think it still would make sense to implement the 'md5' possibility for, especially, the non PLANTUML_RUN_JAVA_ONCE version, i.e. if the file already exists don't try to recreate the image. - This is a next item. - PlantumlManager::instance()->insert() : this function will be changed to skip image. # Configuration - add configuration value in Doxyfile - PLANTUML_RUN_JAVA_ONCE = YES # Debugging - doxygen -d plantuml - doxygen -d time -d extcmd # 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 - -d time - -d extcmd
* add format in writePlantUMLSource() and gathered in one pu file. But it is ↵Charles.Lee2018-08-281-2/+9
| | | | not final
* source arrangementCharles.Lee2018-08-271-4/+4
|
* Imporvement of performance : Reduce the Java running countCharles.Lee2018-08-271-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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
* Bump copyright yearDimitri van Heesch2015-02-261-1/+1
|
* Bug 731947 - Support for PlantUMLDimitri van Heesch2014-08-101-0/+40