Autopattr Performance In Complex Patcher
I'm working on a M4L project currently that contains several subpatchers and those subpatchers contain multiple instances of other subpatchers.
I'm having real performance issues when loading and saving the device - takes upwards of 20 seconds to load the device and for Live to become responsive again. I seem to have tracked the issue down to autopattr/pattrstorage within the subpatchers. I say this because I removed all autopattrs from the subpatchers and (not surprisingly) loading and saving became really fast and responsive.
I then went back through the subpatchers, navigating bottom-up through their parent relationships and added back autopattr/pattrstorage one by one. Everything seemed to be pretty good until I got to the 'master' patcher. Once I added back autopattr to it it slowed right down again.
Presumably the issue is in Max auto navigating through the subpatcher tree to find and restore parameters that have been grabbed by the individual subpatcher's autopattr.
Functionally it's working as I want. The parameters that are being saved are the parameters I need to save. I'm just wondering if there's a better approach to a large project like this with complex nesting? Would I be better to add pattr objects to each subpatcher (then bind them to the parameters I need to save/restore), and then add a pattrhub to the top-level patcher? Something along those lines. The assumption being that if Max doesn't have to auto-discover parameters via the nested autopattrs then there'll be less of an impact when loading/saving?
Any advice or suggestions?