locked
Persisted workflows are not performing well compared to WF3.0 RRS feed

  • Question

  • I'm on a project that started in 2007 and continues to this day (2/11/11).  We started by using WF3.0 state machines that are long running (persisted).  There are 4 different state machines.  We decided to upgrade to WF4.0 because of the promises of 10 times the performance of previous versions.  We've not seen that performance increase since we deployed to production 3 weeks ago.  In fact, things are worse.

    We chose to use WorkflowApplication to host the workflow on our web services (to mimic how we were doing things in 3.0).  Each time we do a workflow action on a document, we create a wrapper around the WorkflowApplication and it creates the persistence goo necessary.  When done, we remove the owner lock.  

    We also have references to 3 of our projects that have constants (and other things like our data access layer) so we can use those in the XAML.  We are also using the Microsoft.Activities.StateMachine assembly for our state machine.

    These are the sizes of the XAML files:

    • 170 KB
    • 850 KB
    • 266 KB
    • 434 KB

    We are seeing the following issues:

    • Memory usage has increased dramatically
    • The time to load the workflow has increased dramatically (we are seeing that the VB compiler is taking the lion's share of the time)
    • We are timing out when we do simultaneous actions for a workflow
    My questions are:
    1. What can I do (if anything) to configure workflow to improve my issues?
    2. What can I do (if anything) to redesign how I am using workflow to speed it up?
    3. Are the performance improvements promised only for non-persisted workflows?
    Rich

    Friday, February 11, 2011 6:43 PM

Answers