Some reasons why building time too long
search cancel

Some reasons why building time too long

book

Article ID: 262943

calendar_today

Updated On:

Products

CA Plex

Issue/Introduction

From time to time, developers see for some functions, building times are too long both in WinC and in RPG. This techdoc documents some reasons why this could happen and how to address them.

 

Environment

Release : 7.21

Resolution

1. huge duplicate generated code

possible solution is -
Instead of +For Each Field DetailP, keep +For Variable DetailP ad statement.

2. default setting of optimization

disabling the optimization to specific file level (not at the project level setting change) can help in certain situation:

Approach #1.
- Go to the problematic function source code (.cpp, .h)
- Open associated header file for the function in question. 
- Add following source code in header file, to disable the optimization.

    #pragma optimize("", off)

- Save the changes.
- Build the function.

Approach #2.
To implement this solution in Plex, one of the possible way is:
- Create a header file (e.g. DisableOptimization.h) having the following code in it.
 
   #pragma optimize("", off) 

- Create a source code object and include the above header file as part of the source code object.

#include "DisableOptimization.h"

- Keep the header file in model source code generation folder.
- Call this source code object in AD of the function in question.
- Generate and build the function in question