What is the main cause of slow unstable Project?
Hello!
I'm working on one of my ideas slowly as a hobby for years now.
I have changed interface and added some new functions.
There are some bugs, sometimes on playback and crash when presets are loaded.
But it is not the main issue at the moment.
Want I want is to make my project more light, with faster loading time.
After long waiting to open it on Max or Ableton as .amxd , playback works ok, but I have this feeling that it is very heavy and unstable.
It is Generative MIDI Sequencer (Max objects only! NO audio Msp or video Jit objects in this project)
The project structure consists of 3 main [bpatchers], and some additional smaller [bpatchers].
Main Patcher - size 52Mb (with all embeded subpatchers)
1. Recoded Notes Display [bpatcher 1] - (0.6Mb)
2. Playback Display [bpatcher 2] - (12Mb with subpatchers)
- 4x subpatchers (1,3Mb each)
3. Function Generator Display [bpatcher 3] - (30Mb with subpatchers)
- 4x subpatchers (6,5Mb each)
What should I do? How can I achieve more faster load time?
I have good pc work station, it just feels a bit strange that 52Mb project is loading so slow on open.
Should it be? maybe there are some specific bugs or objects that make it slow?
I'm trying to put 0.5-2 second delays on loadbangs, as joke ,because there is not much to load on open actually - no presets, only some numbers.
I'm thinking to split it in 2 different patches and connect them with [s] and [r] as a final solution, but I'm not so happy about it. yes I think it can help in m4l for example if I open 3. subpacher as separate .amxd device in separate track , but as I told I'm not so happy about this idea.
I'm having this problem with many max projects often.
As soon as my patches get more complex, my project is starting to get slower and more unstable, and I' m forced to leave great ideas and some hard work to rot for years untouched.
You may google for some keywords like big patches, loading time, optimization, efficiency, cpu usage, ...
also have a look here:
https://cycling74.com/forums/slow-startup-with-very-large-patch-how-best-to-tackle
https://cycling74.com/tutorials/managing-complex-patches-in-max
https://cycling74.com/forums/making-a-slick-max-standalone-expo-74-presentation-available
52Mb (max only) sounds quite heavy to me...
Thank you for reply!
I will take a look right now
I'm was a bit confused about what is considered as large max patcher.
52Mb for average Vst Synth as I take a look in my 3rd party Vst folder is normal size.
only thing that it is all max objects, there is no media files like images or sounds at all.
I took quick look in the links about patch optimization. good read
As I understood to have nice smooth working patch in max I have to be smart, disciplined and less greedy. First I will try to get 1/3 off the size and then see how it works...
Also, try to separate your questions in smaller more focused ones.
The following topics are very different ones, even if sometimes connected:
- patch loading time (one of the links Ben gave contains excellent advice)
- DSP use (as in "Audio Status" DSP) (although that's not the case of the patch you mention)
- performance when you navigate the patch in Unlocked mode
- graphical performance when in Locked mode
- Max freezes for a short while ("rainbow wheel" on Mac, not a crash, just some freeze because you ask a lot in a short time - not always "unstable": it may be perfectly reproductible, and the User Experience may be improved with some changes in the programming)
- M4L specific issues
- crashes - that should not happen, and ideally should translate to a trimmed down patch and bug report.
52 mb seems big, but a "long" - however long exactly that is - loadtime should not even appear with 52 mb.
and that max7+ patches are so big is probably not his fault, i bet 99% of that is unused styles and other ancient californian hieroglyphs.
given that a character uses 1 byte, a 50 megabytes json file would consist of about 50 million characters, which is equivalent to more than 20,000 pages of text or more than 100,000 pages of typical max json text.
@Janeis
Here is the link including the solution of the "unused style-issue" Roman is referring to, you should check, if you are also affected:
https://cycling74.com/forums/max-7-removing-a-style-from-the-library-location-nnnn
So I reduced patcher size to 25Mb.
Its still loading kind a slow but on play mode it feels a lot more light.
I was deleting all unnecessary bangs, message, number boxes and objects and found a lot of mess in my old subpatchers. I found some duplicate subpatchers and a lot more subpatchers all over the place actually. ...and I got less greedy and reduced function generator capability by 50% as well.
Overall my max project is working a lot better now it almost does not crash at all, It did only once as m4l device in Ableton after 15min when I was recording audio and midi.
Will do my best but I don't think I can get my final patcher lower that 20Mb.
Maybe only If use javascript to make my own externals or something.... will see