Salesforce

How Do I Improve Performance When a Task is Being Called Repeatedly by a Batch Task? (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Improve Performance When a Task is Being Called Repeatedly by a Batch Task? (Magic xpa 3.x)

Sometimes, when one batch task is called repeatedly by another batch task, performance can be very slow. This often turns out to be due to the overhead required to open and close the files used by the subtask. There are a few simple steps you can take to improve performance in these cases.

Improving performance of batch subtasks

  1. The first and most important step is to make sure that the files used by the subtask are pre-opened in the parent task. Different file systems have different amounts of overhead for a file open, but it often takes longer to open a file than to read the records.



    If the file is not being used in the parent task, you can pre-open it by inserting a declare line in the data view. The Access used in this line must match the Access used when the subtask opens the file.

  2. Secondly, make sure the batch task is loaded as resident. This keeps the batch task from being reloaded every time it is called.

    To make the subtask load as resident:

  • Go to Task Properties (Ctrl+P).

  • Go to the General tab.

  • Set Resident Task to Yes.

  1. Last, make sure that the transaction mode in the parent task is not deferred. When the transaction mode is deferred, all the subtask transactions “stack up” and can seriously degrade performance. To check the transaction mode:

  • Go to the parent task.

  • Go to Task Properties (Ctrl+P).

  • Go to the Data tab.

  • Set the transaction mode to what you need for the task. In this case, we turned off transactions totally. Since many large batch tasks are for reports, which do not update data we care about, there is no need for transaction processing.

See also

The Online and Rich Client Samples projects (program TS32 and RTS32)

Reference
Attachment 
Attachment