Gosu performance best practices
The ways in which you write your Gosu code affects compile-time and run-time performance. As best practices for improving the performance of your code, Guidewire recommends that you always do the following:
- Use the fastest technique for string concatenation
- Consider the order of terms in compound expressions
- Avoid repeated method calls within an algorithm
- Remove constant variables and expressions from loops
- Avoid doubly nested loop constructs
- Pull up multiple performance intensive method calls
- Be wary of dot notation with object access paths
- Avoid code that incidentally queries the database
- Use comparison methods to filter queries
- Use comparison methods instead of the Where method
- Use Count properties on query builder results and find queries
- Use activity pattern codes instead of public IDs in comparisons
- Create single plugin instance
