Re: Method call profiler?

[email protected]
Newsgroups gmane.comp.audio.supercollider.devel
Message-ID <[email protected]>

> On 30/03/2018, at 11:04 , [email protected] wrote:
> 
> Currently, there is no way to know which quarks and other extensions are required for a given block of code. It may be possible to parse out method selectors, but there's no way to know which implementations of those selectors are actually invoked.

I once wrote up something that put all class and method names in a given quark into a text file within that quark folder, 
so one could load it, and figure out that way which quark an unknown method call may need.
Can try to find that if you like.

> What if there were a debug mode that kept a table of every method invocation? E.g. class, method, number of calls, perhaps execution time. It would have a lot of calls to core methods, but it wouldn't be hard to search for extension directories.
> 
> One use case: sharing code. To share code, you also need to share extensions on which the code depends. It's very easy to use some method in a quark that you installed ages ago and forgot about, and you're "absolutely sure" you're using only main library methods, but then it breaks when your friend runs it. As of now, we not only don't have a good way to handle this -- we have *no* way. You're totally on your own.

For that use, you can always get a list of which quarks you have installed when you test whether your patch to be shared runs, with:
Quarks.installed.collect(_.name).cs;
and then you have a known good config, which you can put that in the codefile you hand to your friend:
["mylib","etc"].do(Quarks.install(_);

Or copy your current config and prune it down to see what the minimum working set of quarks is...

best adc



_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.