From: Clemens Ladisch <clemens@ladisch.de>
To: "Tim E. Real" <termtech@rogers.com>, alsa-devel@alsa-project.org
Subject: Re: Single vs. multiple seq client ports
Date: Wed, 04 Feb 2015 08:52:17 +0100 [thread overview]
Message-ID: <54D1CFB1.8030407@ladisch.de> (raw)
In-Reply-To: <11961012.AHGMH1UnbJ@col-desktop>
Tim E. Real wrote:
> What are the advantages and disadvantages if any, in terms
> of speed and resources, of having a single client port versus
> multiple client ports?
A port itself does not need much memory (it's just the name and other
metadata); as far as events are concerned, a port is just a number.
Events are stored in a client's buffer (in the sender's when they are
queued, in the receiver's when they are delivered).
A client's ports are stored in a linked list, and are looked up when
events are transmitted, so you should not have a very large number of
ports.
When the ports are visible to the user (because you want him to be able
to make connections dynamically), using multiple ports allows you to
expose different parts of your application (and use different
permissions, if this makes sense). If the ports are not visible, it
might make sense to have multiple ones if you use the port number for
routing.
Regards,
Clemens
prev parent reply other threads:[~2015-02-04 7:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-04 0:44 Single vs. multiple seq client ports Tim E. Real
2015-02-04 7:52 ` Clemens Ladisch [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54D1CFB1.8030407@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=termtech@rogers.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.