Performance tips (new options in PU11)

Python environment

As of PU11.00, view scripts can share a python interpreter. Shared environments are faster.

When using shared environments, the onOpen function needs to return a class. See example below.

You specify which environment you want your script to run in using env(environment_name) at the top of the script.

If there is no env line then the script will get its own interpreter.

If script A has env(env1), and script B and C have env(env2)

then all instances of script A will run in env1,

and all instances of scripts B and C will run in env2.

Example: You have one script run multiple times on the same view with different parameters.

Tracking original values

Applies to View scripts and screenscripts