With the version 1.25, this performance issue has been resolved by using a generic syntax plugin that captures all components to overcome the dokuwiki parser limitations.
When installing combo, people may see a degradation in performance during the initial rendering of a page.
This page explains why.
The measurements have been made on a development laptop with:
On a production Linux server, the latency measured is in the second range.
Why do we get extra execution time after installing combo.
The one reason for the degradation is due to the parser.
The execution time of the parser is a linear function of the number of syntax component.
Combo adds 95 components.
The more syntax, the more the parser takes time to build.
In this snapshot, we can see that for a parsing (get_instructions), the process runs for 9 seconds where:
The second reason is that simple and still complex syntax components need to know where they are, in the page.
For instance: the combo heading may be:
How does it know this fact?
It checks if it is inside a component or not (in other words, if it has a parent)
And unfortunately, this functionality is not embedded natively in DokuWiki.
The below snapshot shows that moving in the parse tree (called callstack in combo), takes up 1/3 of the execution time (3secs over 9)
Combo offers slot functionality that the user can modify on the fly (header, footer, …).
This functionality means that the parser needs to be used, adding execution time to the first request.
To solve this problem, we are working on the … parser.
By order of priority, we have:
If you want to check, below are requests from the edit page that have been profiled.
You can read them with any Xdebug Profile Reader
You can see that the more execution, the more time.
Plugin | Configuration | Profile file | Server Time | Profile File Size (kb) |
---|---|---|---|---|
None | without cache | cachegrind.out.1671625103-D__dokuwiki_doku_php | 880ms | 5941 |
Combo | without cache, first request | cachegrind.out.1671625269-D__dokuwiki_doku_php | 7sec | 43734 |
Combo | with cache, second request | cachegrind.out.1671625714-D__dokuwiki_doku_php | 976 after upstart | 3543 |
Combo / strap | without cache, first request | cachegrind.out.1671625904-D__dokuwiki_doku_php | 10 second | 70652 |
Combo / strap | with cache, second request | cachegrind.out.1671626765-D__dokuwiki_doku_php | 822ms | 3974 |
The files are available on this link