During the development of my last MIDI device I experienced huge problems with lags in visualization and audio dropouts. The device is a pure MIDI processor, no Audio, no externals. It uses the preset object in conjunction with the pattrstorage object, working perfectly with Live's Preset and Live Set storage and recall. The audio dropouts did not show up while in MAX device editor but the visualization lags were worse (up to several seconds!)..
I contacted cycling74's and Ableton's support. They replied but couldn't help. Already I had found out that the problem was related to the pattrstorage and related functionality. I particular the audio dropouts happened in coincidence with the store function. In addition the frequency of partial(MAX only) or total crashes increased dramatically up to 1 crash every 15 minutes when using MAX device editor!
And – magically – all above mentioned problems disappeared! Also the frequent crashes using the MAX device editor are (nearly 99%) gone.
As seasoned programmer I'm used to proceed in an incremental manner - 1 modification at a time – and test. So introducing the new preset management nothing else had been changed. That's why I'm absolutely sure that the culprit was the preset object!
Hope this may be helpful for someone...