* [ANN] dtas 0.9.0 - duct tape audio suite for *nix
@ 2014-12-22 9:26 5% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2014-12-22 9:26 UTC (permalink / raw)
To: ruby-talk, dtas-all
Free Software command-line tools for audio playback, mastering, and
whatever else related to audio. dtas follows the worse-is-better
philosophy and acts as duct tape to combine existing command-line tools
for flexibility and ease-of-development. dtas is currently implemented
in Ruby (and some embedded shell), but may use other languages in the
future.
Changes:
dtas 0.9.0 - minor features and speedups
The major new feature is '>' and '<' keys are now supported
in the dtas-console interface for dtas-player.
dtas-tl cat" also received a minor speedup for big tracklists
via syscall reductions
shortlog of changes since 0.8.0:
process: update comment for bug workaround
process: update comment for bug workaround #2
compat_onenine: simplify pipe wrapper
tracklist: favor &:sym_to_proc style
dtas-console: '>' and '<' keys for tracklist next/prev
dtas-tl: halve write() syscalls when emitting tracklists
reduce syscalls in recvmsg invocations
doc: flesh out "tl" subcommand docs
The best is yet to come!
* http://dtas.80x24.org/README
* http://dtas.80x24.org/INSTALL
* http://dtas.80x24.org/dtas-player.txt
* http://dtas.80x24.org/NEWS
* git clone git://80x24.org/dtas
* dtas-all@nongnu.org (plain-text only, no HTML mail, please)
* http://80x24.org/dtas-all/
* http://dtas.80x24.org/2014/dtas-0.9.0.tar.gz
SHA-1 edbd256f4653eed70a52ee972e0e7b2e781fdfdf
* http://dtas.80x24.org/2014/dtas-0.9.0.gem
SHA-1 41330a9374a2172482b85f27082a5624b72b30cd
--
EW
^ permalink raw reply [relevance 5%]
* [PATCH] reduce syscalls in recvmsg invocations
@ 2014-12-22 1:12 7% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2014-12-22 1:12 UTC (permalink / raw)
To: dtas-all; +Cc: Eric Wong
Favor IO.select over IO#wait since the latter makes another
ioctl syscall (which we'll make anyways for IO#nread).
Having BasicSocket#recvmsg and recvmsg_nonblock detect the buffer
size requires extra syscalls, so pass explict maxmesglen, flags, and
maxcontrollen args to elide auto-detection since we already have the
buffered amount from IO#nread.
This cuts more syscalls from the "dtas-tl cat" invocation with
larger tracklists.
---
lib/dtas/unix_accepted.rb | 2 +-
lib/dtas/unix_client.rb | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/dtas/unix_accepted.rb b/lib/dtas/unix_accepted.rb
index 2c82d2a..3008afc 100644
--- a/lib/dtas/unix_accepted.rb
+++ b/lib/dtas/unix_accepted.rb
@@ -56,7 +56,7 @@ class DTAS::UNIXAccepted # :nodoc:
begin
begin
- msg, _, _ = io.recvmsg_nonblock(nread)
+ msg, _, _ = io.recvmsg_nonblock(nread, 0, 0)
rescue Errno::EAGAIN
return :wait_readable
rescue EOFError, SystemCallError
diff --git a/lib/dtas/unix_client.rb b/lib/dtas/unix_client.rb
index 40dedcc..7382ea6 100644
--- a/lib/dtas/unix_client.rb
+++ b/lib/dtas/unix_client.rb
@@ -38,9 +38,9 @@ class DTAS::UNIXClient # :nodoc:
end
def res_wait(timeout = nil)
- @to_io.wait(timeout)
+ IO.select([@to_io], nil, nil, timeout)
nr = @to_io.nread
nr > 0 or raise EOFError, "unexpected EOF from server"
- @to_io.recvmsg[0]
+ @to_io.recvmsg(nr, 0, 0)[0]
end
end
--
EW
^ permalink raw reply related [relevance 7%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-12-22 1:12 7% [PATCH] reduce syscalls in recvmsg invocations Eric Wong
2014-12-22 9:26 5% [ANN] dtas 0.9.0 - duct tape audio suite for *nix Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/dtas.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).