| chnget/chnset should only be doing the search once at init-time for
the channel pointer. We could take a look at the hash table
implementation:
https://github.com/csound/csound/blob/develop/Engine/csound_data_structures.c
The hash function is here:
https://github.com/csound/csound/blob/develop/Engine/csound_data_structures.c#L100
It might very well be that we are getting a lot of hash collisions
with items all going into the same bucket.
Can you give us the channel name pattern you are using, assuming you
are generating the names? We could write a test and profile to see
where the bottleneck is.
On Wed, Jan 30, 2019 at 6:22 PM Eduardo Moguillansky
wrote:
>
> The number of channels active (being read or set) at any given time does
> not change much, remains less than 1000, and this is fine at the
> beginning. After the number of channels increases (each new note creates
> a set of channels through which it is passed information) cpu usage
> increases. My guess is that finding the channel pointer is more
> expensive when the number of keys in the hashtable increases, but I
> don't know the implementation.
>
> On 30.01.19 22:11, Guillermo Senna wrote:
> > But is it because he is actively chn-getting so many channels or just
> > because the channels exist?
> >
> > If the former, maybe using a specific channel as a flag for when there's
> > something new to be read by all the chngets.
> >
> > If the latter, maybe he can compress and later parse information so that
> > there's a smaller amount of channels.
> >
> >
> > On 30/1/19 17:44, Victor Lazzarini wrote:
> >> I know a bit, but Steven may know more. The original reworking of channels for Csound 6 was done by Andrés.
> >>
> >> I am surprised to see performance degraded
> >> by using too much memory, I wonder if it's
> >> not something else.
> >>
> >> Victor Lazzarini
> >> Dean of Arts, Celtic Studies, and Philosophy
> >> Maynooth University
> >> Ireland
> >>
> >>> On 30 Jan 2019, at 20:37, john wrote:
> >>>
> >>> M
> >>> Not my code but that involves deleting from a ash table which may or maynot be imolemented. Not sure who knows this code -- possibly Steven?
> >>>
> >>>
> >>>> On Wed, 30 Jan 2019, Eduardo Moguillansky wrote:
> >>>>
> >>>> hi,
> >>>>
> >>>> I am using chnget /chnset to communicate between a master instrument and a (big) set of "child" instruments. For each note scheduled a number of channels are created for communication. After a certain amount of time, performance degrades (cpu usage increases). Would it be possible to implement a "chndel" opcode, to remove a channel after it is not being used anymore?
> >>>>
> >>>> thanks,
> >>>>
> >>>> Eduardo
> >>>>
> >>>> Csound mailing list
> >>>> Csound@listserv.heanet.ie
> >>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> >>>> Send bugs reports to
> >>>> https://github.com/csound/csound/issues
> >>>> Discussions of bugs and features can be posted here
> >>>>
> >>> Csound mailing list
> >>> Csound@listserv.heanet.ie
> >>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> >>> Send bugs reports to
> >>> https://github.com/csound/csound/issues
> >>> Discussions of bugs and features can be posted here
> >> Csound mailing list
> >> Csound@listserv.heanet.ie
> >> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> >> Send bugs reports to
> >> https://github.com/csound/csound/issues
> >> Discussions of bugs and features can be posted here
> > Csound mailing list
> > Csound@listserv.heanet.ie
> > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> > Send bugs reports to
> > https://github.com/csound/csound/issues
> > Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
> https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |