VST using huge amounts of RAM causing Lag
-
my plugin has macro controls that are saved in presets but when those presets are cycled through on Mac it causes an access violation and crash. I attempted to debug it but the access violations are gone in debug version and instead its causing extreme lag. how can i determine what is causing that and rectify it? any advice is greatly appreciated
-
@Adam_G said in VST using huge amounts of RAM causing Lag:
my plugin has macro controls that are saved in presets but when those presets are cycled through on Mac it causes an access violation and crash. I attempted to debug it but the access violations are gone in debug version and instead its causing extreme lag. how can i determine what is causing that and rectify it? any advice is greatly appreciated
Try different optimisation levels with the debug build, the problem might be reproducible in the debug that way
-
@d-healey thanks i will do that. so i need to recompile hise debug with that flag changed, then use xcode to debug the vst project in my daw. right?
-
@Adam_G No you can just compile your project with the flag changed
-
@d-healey didnt seem to make a difference unfortunately.
-
@Adam_G regarding the RAM usage. Does your project contain a lot of embedded images?
-
@d-healey nope its actually %100 panels and laf. there are a couple of svg icons being painted though they are small
-
@Adam_G Have a look in the pooled resources table and find out what is eating up your RAM. You can add this window as a custom popout.
-
@d-healey thanks David. after some investigating the memory usage stays under 300mb which doesnt seem like a problem but the cpu load is what spikes when those layers are active. is there a way to look at the source of that? edit: theres a high number of active voices - 130+ but im unsure if that is alot? the sampler is set at max 256 and soft limit 128
-
@Adam_G what are you trying to achieve here? The debug version will always be slow and you absolutely must not distribute a debug build to end users.
-
@Christoph-Hart 2 samplers and 2 waveform generators but when voices exceed 120(roughly) there is a lag. the only reason for my considering distributing a debug version is that the presets containing macro automations crash the plugin in the release version on mac and im unable to determine why. it does not happen in the debug version.
-
@Christoph-Hart any advice?
-
the only reason for my considering distributing a debug version
never, and I mean
NEVER
distribute a Debug build. The only reason you should have for considering distributing a Debug build is if it's the last day in your job for the company and you want to burn it to the ground before leaving because they didn't pay you for the last 12 months.
If the release build crashes, it's probably a complex multithreading problem that is masked by the poor performance of the Debug build. I vaguely remember that @hisefilo had a similar problem with the macro controls being restored, but you've already figured that out :)
-
@Christoph-Hart thank you now i know EXACTLY how to exact my revenge :smiling_face_with_horns: