Known Scripting performance issues

The following are some events which might contribute to slow performance if extensive coding is done:
- BusComp_PreGetFieldValue
- WebApplet_PreCanInvokeMethod

There two events are frequently fired. For PreGetFieldValue event, it is called every time the user interface is updated to repaint the fields and also be called in other internal uses. For
PreCanInvokeMethod event, this is frequently fired in response to user actions.

In version 8.0 and above, instead of using PreCanInvokeMethod to enable a custom method, this can be done using “CanInvokeMethod” user on the applet user property. For example:
Name: CanInvokeMethod: Test
Value: Y

This user property is suitable for custom method that is not enable/disable based on any (complex) condition.

The use of GetProfileAttr and SetProfileAttr methods in browser script are usually to pass a value in browser scripts or, between browser and server scripts. As these methods make a round-trip to the server, they might potentially contribute to slow performance. Therefore, they should only be used with caution and not extensively.  

As mentioned in earlier reply there are few specific events which has significant performance impact if we write code there like WebApplet_Load and BusComp_PreGetFieldValue etc.

If you logic is having frequent travel between Server and Browser script.

Memory variables are not released in finally block.

Frequent travel to database (Get,Set,Query) instead of storing data in buffer.

Script is not using proper execution identifiers like forward only, backward only.

Not using Switch and using if extensively. Etc

If you are using Siebel 8.x then you have to use ST engine for scripting which is also a better performance tool than T Engine.

Note: Scripting is last option which we have to use for any requirement, it’s recommended to using configuration or application level module (DVM, Healy, etc) to achieve your requirement.