Out of line functions should be improved in several ways:
- Generate a global class that has a context member, and onCreate() functions to initialised.
- Generate a global function which creates an instance and calls through
- Allow local instances inside activities etc. so the class instance can cache allocators etc.
- Allow out of line functions to call global graphs/child queries. (What does this mean in thor??)
- Allow dependencies from user-functions e.g., pre-evaluate global expressions. How do we ensure these are executed? Inherited by the caller??
- For dependencies, how are variables serialised to slaves? Do they need to be? Thor/Roxie differences?
The ultimate goal is to allow any sensible chunk of functionality to be extracted as a user function, and have it execute as efficiently as if it was expanded inline.