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
-~----------~----~----~----~------~----~------~--~---

Reply via email to