Hi John,
At first, thanks for the logger code. It has been very useful.
For next tests I have used a basic ruote-web installation (downloaded
today). Tests involve a execution of a workflow loaded from big XML, which
is something like this:
<process-definition revision="0.1" name="flow">
<description> flow </description>
<sequence>
<set field="f_01" value="var01"/>
<set field="f_02" value="var02"/>
...
<set field="f_40" value="var40"/>
<if>
<equals field-value="one" value="two" />
<sequence>
<!-- XXX lines of flow that are not run, because the condition is not
met -->
</sequence>
</if>
</sequence>
</process-definition>
I have made four tests. Time was measured from the first set-field operation
timestamp (seen with your logger code) to the last set-field timestamp.
1) 40 set-fields from a XML workflow definition with 340 lines. 5 seconds.
2) 40 set-fields from a XML workflow definition with 1170 lines. 11 seconds.
3) 40 set-fields, in one sweep using a hash, from a XML workflow definition
with 1170 lines. 2 seconds.
4) 40 set-variables from a XML workflow definition with 1170 lines. 14
seconds.
A hash of set-fields seems to be the solution. But it is strange that the
size of the workflow part that is not executed influences in the final
runtime.
By the way, related to ruote-web installation I have found two problems:
- I had to disable the rufus-eval git repository from lib/task/ruote.rake
because it did not exist.
- I had to comment line 454 from
vendor/openwfe/extras/participants/active_participants.rb
# ActiveRecord::Base.connection_pool.release_connection
because connection_pool method is missing for ActiveRecord-2.0.2
(recommended version for run ruote-web)
Kind regards.
Diego.
2009/1/21 John Mettraux <[email protected]>
>
> On Wed, Jan 21, 2009 at 6:42 PM, <[email protected]> wrote:
> >
> > We are using your benchmarking program to do some tests. Thanks for the
> > code! Our results seem interesting.
> >
> > ruby : ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
> > memory : 2GB
> > processor : 2.4 GHz Intel Core 2 Duo
> > os : Ubuntu GNU/Linux 8.10 Intrepid Ibex
> >
> > With ruote-0.9.20: http://gist.github.com/49614
> >
> > There are two different scenarios:
> > - Workflow with 40 fields/variables loaded from XML
> > - Workflow with 40 fields/variables loaded from "big XML", which is
> > something like this:
> >
> > <process-definition revision="0.1" name="flow">
> > <description> flow </description>
> > <sequence>
> >
> > <set field="f_01" value="var01"/>
> > <set field="f_02" value="var02"/>
> > ...
> > <set field="f_40" value="var40"/>
> >
> > <if>
> > <equals field-value="one" value="two" />
> > <sequence>
> > <!-- 300 lines of flow that are not run, because the condition is
> > not met -->
> > </sequence>
> > </if>
> >
> > </sequence>
> > </process-definition>
> >
> > The two values that are significant are those for big
> > XML/fields/FilePersistedEngine/(debug off), with a run time of
> 13.283186s,
> > and big XML/variables/FilePersistedEngine/(debug off), with a run time of
> > 24.425080s.
>
> Hi,
>
> you seem to be using a default ruote-web (densha) 0.9.18, so the
> engine is the "CachedFilePersistedEngine" one.
>
>
> > This is representative of our problem. Our set-fields take a long time
> > (10-15 seconds) to initialize when they are into a big XML. John, in your
> > opinion, what is the best solution for this problem?
>
> Have you measured this to be the "set-fields" time ?
>
> I'd suggest adding this at the end of your config/environment.rb to
> get timestamps in your logs :
>
> ---8<---
> class Logger
> def format_message(severity, timestamp, progname, msg)
> #"#{timestamp} (#{$$}) #{msg}\n"
> "#{timestamp.strftime('%Y/%m/%d
> %H:%M:%S')}.#{timestamp.usec.to_s[0, 3]} (#{$$}) #{msg}\n"
> end
> end
> --->8---
>
> Then you can precisely answer the question : is set-fields taking such
> a long time ?
>
> It would be interesting to time each operation, especially your custom
> include technique. How long does it take for your system to read the
> whole XML and then to turn it into its syntax tree. Then, how long
> does the <set-fields> itself takes ?
>
> When running in development mode, the engine is very verbose. With the
> modification to Logger described a few paragraphs back, you can get a
> detailed picture of what is happening (log/openwferu_development.log).
>
>
> Maybe the best solution, is to design your processes not to
> "transport" too much raw data, but only what is relevant for process
> routing (<if> and such), data for forms can always be retrieved at
> form rendering time. Passing reference to data instead of data itself
> is not a sin.
>
>
> Best regards,
>
> --
> John Mettraux - http://jmettraux.wordpress.com
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruote (OpenWFEru) users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---