yes it's a valid concern.

We should work towards a patch like the one i proposed to init the resources only when they are first called upon so if a paticular call never needs the read codec to do encode and decode then it would only allocate them the first time they actually tried it. then most calls would only use one of each until some of the more crazy scenarios kicked in


On Mon, Apr 6, 2009 at 1:20 PM, Matteo <mbrancaleoni@voismart.it> wrote:
Hi,

----- "Anthony Minessale" <anthony.minessale@gmail.com> ha scritto:
> did you test it in scenarios where the ptime is mismatched, every
> combination of sample rate transcoding, eavesdroping on a channel in
> all the above situations?

no, not at all

> It would require a full suite of testing to confirm.

I agree.

> switch_core_io.c:432 does use read_codec for encode
>
> i think cases arise where it does need both but we could change the
> code to delay when it inits until the
> first time it needs it instead so it would only take place when
> necessary.

the question arose investigating the wrong resource usage of
dadhi codec, since it allocs 2 resources for every call.

maybe the issue is somewhere else?

regards,
matteo



--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:213-799-1400