Closed drj826 closed 8 years ago
Disabling publishing of the library and document change pages resulted in the execution time returning to a reasonable range (4 minutes 12 seconds):
INFO SML Engineering Library INFO ------------------------------ ------ INFO allocation count: 326 INFO configuration_item count: 32 INFO requirement count: 356 INFO role count: 3 INFO test count: 34 INFO ------------------------------ ------ INFO TOTAL ENTITY COUNT: 751 INFO INFO ------------------------------ ------ INFO ATTACHMENT count: 1 INFO DEMO count: 1 INFO DOCUMENT count: 6 INFO EPIGRAPH count: 4 INFO EXERCISE count: 1 INFO FIGURE count: 17 INFO KEYPOINTS count: 1 INFO LISTING count: 80 INFO PREFORMATTED count: 1 INFO QUOTATION count: 1 INFO RAW count: 14 INFO SECTION count: 129 INFO SLIDE count: 1 INFO SOURCE count: 19 INFO TABLE count: 19 INFO VERSION_HISTORY count: 6 INFO ------------------------------ ------ INFO TOTAL STRUCTURE COUNT: 301 INFO INFO ------------------------------ ------ INFO Division Declaration Rules: 44 INFO Property Declaration Rules: 643 INFO Composition Declaration Rules: 280 INFO Enumeration Declaration Rules: 32 INFO Default Declaration Rules: 2 INFO ------------------------------ ------ INFO TOTAL ONTOLOGY RULE COUNT: 1001 INFO INFO publish library INFO get all library entities INFO get all library entities 16 seconds INFO get all library documents INFO get all library documents 58 seconds INFO update sha digest file INFO update sha digest file 0 seconds INFO publish default html sml-ug INFO publish default html sml-ug 29 seconds INFO publish default html sml-brd INFO publish default html sml-brd 5 seconds INFO publish default html sml-dfrd INFO publish default html sml-dfrd 48 seconds INFO publish default html sml-srd INFO publish default html sml-srd 31 seconds INFO publish default html sml-sdd INFO publish default html sml-sdd 27 seconds INFO publish default html sml-ted INFO publish default html sml-ted 15 seconds INFO publish default html library pages INFO publish default html library pages 23 seconds INFO publish default html library index INFO publish default html library index 0 seconds INFO publish library 4 minutes and 12 seconds
This gives me a theory of the problem. I believe my implementation of the change page publishing unnecessarily recomputes certain values over and over again. I'll re-write the implementation to ensure no computational work is repeated unnecessarily.
After refactoring the code I'm happy with the performance. We're back down to 4 minutes 14 seconds to publish the library with library and document change pages:
INFO SML Engineering Library INFO ------------------------------ ------ INFO allocation count: 326 INFO configuration_item count: 32 INFO requirement count: 356 INFO role count: 3 INFO test count: 34 INFO ------------------------------ ------ INFO TOTAL ENTITY COUNT: 751 INFO INFO ------------------------------ ------ INFO ATTACHMENT count: 1 INFO DEMO count: 1 INFO DOCUMENT count: 6 INFO EPIGRAPH count: 4 INFO EXERCISE count: 1 INFO FIGURE count: 17 INFO KEYPOINTS count: 1 INFO LISTING count: 80 INFO PREFORMATTED count: 1 INFO QUOTATION count: 1 INFO RAW count: 14 INFO SECTION count: 129 INFO SLIDE count: 1 INFO SOURCE count: 19 INFO TABLE count: 19 INFO VERSION_HISTORY count: 6 INFO ------------------------------ ------ INFO TOTAL STRUCTURE COUNT: 301 INFO INFO ------------------------------ ------ INFO Division Declaration Rules: 44 INFO Property Declaration Rules: 643 INFO Composition Declaration Rules: 280 INFO Enumeration Declaration Rules: 32 INFO Default Declaration Rules: 2 INFO ------------------------------ ------ INFO TOTAL ONTOLOGY RULE COUNT: 1001 INFO INFO publish library INFO get all library entities INFO get all library entities 16 seconds INFO get all library documents INFO get all library documents 58 seconds INFO update sha digest file INFO update sha digest file 0 seconds INFO publish default html sml-ug INFO publish default html sml-ug 29 seconds INFO publish default html sml-brd INFO publish default html sml-brd 5 seconds INFO publish default html sml-dfrd INFO publish default html sml-dfrd 50 seconds INFO publish default html sml-srd INFO publish default html sml-srd 30 seconds INFO publish default html sml-sdd INFO publish default html sml-sdd 29 seconds INFO publish default html sml-ted INFO publish default html sml-ted 15 seconds INFO publish default html library pages INFO publish default html library pages 22 seconds INFO publish default html library index INFO publish default html library index 0 seconds INFO publish library 4 minutes and 14 seconds
Before implementing the library and document change pages it took about 4 minutes to publish the library and now it takes 14 minutes:
The parsing functions take the same amount of time. The publishing functions have slowed down significantly.