Hi, I'm building my first modules with Module Designer, but I seem to be missing any processing information - load on the CPU, how much memory is uesd... that kind of info.. Reaktor did have options for that...
Is there any module available that gives that kind of info while designing??
Looking through the library within VMD itself, I could not find anything useful for this or did I overlook anything?
Hope someone can help..
cheers Hans
Processing info?
Processing info?
Request for Music
Re: Processing info?
I think you are expected to use a profiler but sometimes that's a bit like using a helicopter to deliver a pizza.
-
- Posts: 69
- Joined: Thu Jun 04, 2020 2:08 am
Re: Processing info?
Hi,
There's some info in previous posts on using VisualVM (a free profiler). However, you need to choose to "Run With Profiler Support" from the Designer menu...and I'm not sure about others, but for me this does not work... CA have said it will be fixed (I think they said or implied in the next VMD update, but don't quote me on that). I'm waiting on that, too, because I got a module rejected recently for high CPU usage. Admittedly it was totally my fault for poor handling of canvas drawing...still, it would be very helpful to see more precisely what's going on CPU wise, especially when trying to do a bunch of custom drawing operations.
JK
There's some info in previous posts on using VisualVM (a free profiler). However, you need to choose to "Run With Profiler Support" from the Designer menu...and I'm not sure about others, but for me this does not work... CA have said it will be fixed (I think they said or implied in the next VMD update, but don't quote me on that). I'm waiting on that, too, because I got a module rejected recently for high CPU usage. Admittedly it was totally my fault for poor handling of canvas drawing...still, it would be very helpful to see more precisely what's going on CPU wise, especially when trying to do a bunch of custom drawing operations.
JK
Re: Processing info?
Thanks JK! Ya, I eventually found that within the forum here and have yet to try that...
I would have expected more tools on CPU and memory-use to be within the designer itself but apparently I expected too much
Will have a try later to see if I get this to work, it's always good to be able to see where problems lie, if any...
And good for optimization too ofcourse...
cheers Hans
I would have expected more tools on CPU and memory-use to be within the designer itself but apparently I expected too much
Will have a try later to see if I get this to work, it's always good to be able to see where problems lie, if any...
And good for optimization too ofcourse...
cheers Hans
Request for Music
Re: Processing info?
A simple user level gadget that indicates CPU usage per module would be great. Then not only devs but users would be able to optimise stuff.
At the moment I rely on crude techniques like doing A/B testing while running multiple instances (to amplify the effect) of the module under development and examining the loads shown by Windows Task Manager. It's primitive to say the least.
At the moment I rely on crude techniques like doing A/B testing while running multiple instances (to amplify the effect) of the module under development and examining the loads shown by Windows Task Manager. It's primitive to say the least.
Re: Processing info?
Ya I think the designer is still in its' infancy level I should probably not compare it to 'more mature' developing tools.... but the problem is that when having worked with such tools you tend to expect to find it everywhere...
Request for Music
Re: Processing info?
I'm taking my actual dev work into IntelliJ with external classes. Did the first three plugins in the VMD alone (plus Sublime Text as external editor), but I do value the benefits of a full-fledged dev environment for the more complex things I've now started building.
I also had one update for one of my modules rejected because of CPU usage - I did the old school thing and just added microsecond counters like so, with two class variables `calculationTime` and `countedSamples` (both initialized with 0):
...and then I set a breakpoint in that `if`. This gave me a regular update with a variable holding the ns needed for the last 20 seconds of audio processing. Was enough for me here, but YMMV and of course it depends on the complexity of your processing (also, this doesn't have any storage checks - in my case, I didn't even use objects, much less anything that'd need to be GC'd or any other larger data structures).
Edited to add, I do think that the VB style UI editor that Cherry built is rather impressive. I'm just so used to things like multiple cursors, built-in refactoring, extensive autocomplete etc.
I also had one update for one of my modules rejected because of CPU usage - I did the old school thing and just added microsecond counters like so, with two class variables `calculationTime` and `countedSamples` (both initialized with 0):
Code: Select all
long start = System.nanoTime();
// ProcessSample computations go here
long finish = System.nanoTime();
calculationTime += finish - start;
countedSamples += 1;
if (countedSamples == 20 * 48000) {
countedSamples = 0;
calculationTime = 0;
}
Edited to add, I do think that the VB style UI editor that Cherry built is rather impressive. I'm just so used to things like multiple cursors, built-in refactoring, extensive autocomplete etc.
Last edited by haslo on Thu Dec 31, 2020 7:35 pm, edited 1 time in total.
Re: Processing info?
Thanks Haslo - I will look into IntelliJ - so far I have been programming in C++, PHP and JavaScript - the change to Java isn't that huge, obviously have to look for some differences, but that's not so hard.. But indeed having some proper system including good debugger and profiler can make the difference
Buy ya - the UI editor is absolutely great, including the Skin Editor!
Buy ya - the UI editor is absolutely great, including the Skin Editor!
Request for Music