Hi,
I recognized, that workflow_hook_info() binds quite a lot of execution time, if
a) you have a lot of workflow state transitions in your project (>10 or 15)
b) you display a lot of forms on a page (e.g. 5 or more)
c) you run your page not in english and you need a translation.
Trigger-module calls the hook once per form generation (via trigger_forms()) and each translation, which is done for a transition, is quite expensive caused by the workflow state name substitutions.
I am talking about execution times of (5 forms * 40 ms) = 200ms for this hook per page load.
To improve the performace, a static caching of the transitions is quite effective. Caching has to be done per language, since workflow data contains translated strings.
I added a patch, which implemented this caching and works fine for me. Executions time reduced to 1 * 40ms in my example.
| Comment | File | Size | Author |
|---|---|---|---|
| workflow.module.patch | 3.27 KB | TS79 |
Comments
Comment #1
TS79 commentednoone interested in performance issues?
Comment #2
Bastlynn commentedOther fish to fry at the moment, but if you can roll a patch against the 7.x branch I can start looking.
Comment #3
TS79 commentedsry, I am not working on D7 until now
Comment #4
johnvThis is resolved in D7. (where it has been moved to new submodule workflow_actions).
Leaving this open for D6, which is unmaintained.
Comment #5
johnvI wish there was a nicer way to clear the issue queue from 'D6-issues that are fixed in D7' then a "won't fix for D6."