GrailsFlow

Opening Worklist takes a lot of time

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0
  • Fix Version/s: 1.0.12
  • Component/s: None
  • Labels:
    None
  • External Supervisor:
    Antonicheva, July
  • Executing Programmer:
    Please select
  • Ext Project Id:
    JCGFW-01

Description

The ProcessController.showWorklist action shows WorkList for current user.
Performance of loading of WorkList become worse with increasing number of executed Processes.

Please check performance and optimize this functionality.

Activity

Hide
Antonicheva, July added a comment - 28/Dec/11 9:29 AM

The performance of worklist can be adjusted by switching "off" variables filtering on the top of the worklist page. Currently when we prepare information for the worklist, we are searching for all user worklist items (without paging restrictions), then we get variables for these nodes and prepare values for filtering.

Show
Antonicheva, July added a comment - 28/Dec/11 9:29 AM The performance of worklist can be adjusted by switching "off" variables filtering on the top of the worklist page. Currently when we prepare information for the worklist, we are searching for all user worklist items (without paging restrictions), then we get variables for these nodes and prepare values for filtering.
Hide
Antonicheva, July added a comment - 28/Dec/11 12:50 PM - edited

It was introduced a new config bean isWorklistFilterAvailable in GrailsflowCoreGrailsPlugin.groovy file. The default value is true (boolean value), it means that query for all worklist items and their variables will be performed. It is possible to turn off filtering by setting isWorklistFilterAvailable bean value to false.

If you have configured worklist filtering to true, it is possible to assume a situation when you have a lot of processes (e.g. > 2000) and it is impossible to get all variables values for filter in one query (some SQL servers restrict the number of parameters for 'IN' clause). In this situation Grailsflow performs several queries (not more then 500 processes are used in one query) and concatenates the results. This concatenation costs time if we have a large number of iterations. There is a bean named maxRestrictedProcesses in GrailsflowCoreGrailsPlugin.groovy file with default value 2000. It means that Grailsflow will try to perform not more then 4 iterations (4 queries) for getting variables values for filter. If there are more restricted processes in system, then the filtering will be skipped.

Small example: currently if there are 10 000 processes restricted to the user (for example, with 10 000 worklist items) and isWorklistFilterAvailable was turned to false then loading for worklist takes 0,6 sec, if isWorklistFilterAvailable was set to true - about 6.5 min;

Show
Antonicheva, July added a comment - 28/Dec/11 12:50 PM - edited It was introduced a new config bean isWorklistFilterAvailable in GrailsflowCoreGrailsPlugin.groovy file. The default value is true (boolean value), it means that query for all worklist items and their variables will be performed. It is possible to turn off filtering by setting isWorklistFilterAvailable bean value to false. If you have configured worklist filtering to true, it is possible to assume a situation when you have a lot of processes (e.g. > 2000) and it is impossible to get all variables values for filter in one query (some SQL servers restrict the number of parameters for 'IN' clause). In this situation Grailsflow performs several queries (not more then 500 processes are used in one query) and concatenates the results. This concatenation costs time if we have a large number of iterations. There is a bean named maxRestrictedProcesses in GrailsflowCoreGrailsPlugin.groovy file with default value 2000. It means that Grailsflow will try to perform not more then 4 iterations (4 queries) for getting variables values for filter. If there are more restricted processes in system, then the filtering will be skipped. Small example: currently if there are 10 000 processes restricted to the user (for example, with 10 000 worklist items) and isWorklistFilterAvailable was turned to false then loading for worklist takes 0,6 sec, if isWorklistFilterAvailable was set to true - about 6.5 min;
Hide
Antonicheva, July added a comment - 29/Dec/11 9:48 AM

Please, check the solution.

Show
Antonicheva, July added a comment - 29/Dec/11 9:48 AM Please, check the solution.

People

Vote (0)
Watch (0)

Dates

  • Created:
    26/Dec/11 3:16 PM
    Updated:
    24/Feb/12 8:41 AM
    Resolved:
    24/Feb/12 8:40 AM