[pulseaudio-discuss] [PATCH RFCv3 00/51] optimizations
Peter Meerwald
pmeerw at pmeerw.net
Sun Nov 9 14:03:32 PST 2014
Hello,
> this patch series aims to save memory allocations and some system calls
> related to PA's client/server protocol implementation
I've pushed the cleanup patches indicated below so that the more important
changes become more prominent in the list
I intend to push the first 16 patch ('tagstruct', 'packet', 'pstream') by
the end of the week
regards, p.
> Peter Meerwald (51):
> tagstruct: Distinguish pa_tagstruct_new() use cases
> tagstruct: Replace dynamic flag with type
> tagstruct: Get rid of pa_tagstruct_free_data()
> tagstruct: Add type _APPENDED
> tagstruct: Use flist to potentially save calls to malloc()/free()
> packet: Hide internals of pa_packet, introduce pa_packet_data()
> packet: Make pa_packet_new() create fixed-size packets
> packet: Introduce pa_packet_new_data() to copy data into a newly
> created packet
> packet: Use flist to save calls to malloc()/free()
> pstream: Unionize item_info
> pstream: Add pa_pstream_send_tagstruct()
> pstream: #define PA_PSTREAM_SHM_SIZE
> pstream: Duplicate assignment, write.data is always NULL
> pstream: Only reset memchunk if it has been used
> pstream: Split up do_read()
> pstream: Use small minibuffer to combine several read()s if possible
> iochannel: Fix channel enable
> queue: Add pa_queue_peek() function
> pstream: Add helper functions reset_descriptor(), shm_descriptor()
> pstream: Peek into next item on send queue to see if it can be put
> into minibuffer together with current item
> pstream: Don't call defer_enable() on SHMRELEASE
> once: Inline functions
> rtpoll: Fix condition for DEBUG_TIMING output
pushed
> rtpoll: Drop extra wait_op argument to pa_rtpoll_run()
pushed
> mainloop: Clear wakeup pipe only when necessary
> flist: Don't use atomic operations to manipulate ptr, next
> flist: Don't make flist volatile
> rtpoll: Annotate branches with LIKELY
> mainloop: Annotate branches with LIKELY
> alsa: Make rtpoll_run() runtime measurement compile-time code, default
> off
> alsa: Annotate branches in ALSA sink/source thread_func() with LIKELY
> resampler: Drop pointless remix variable
pushed
> build-sys: Add --disable-statistics
> sample: Make pa_sample_size_table public
> sample: Make pa_channels_valid() inlineable
> sample-util: Add inlineable functions
> core: Make use of use inlineable macros
> resampler: Precompute maximum block size in frames
> mix: Make use of pa_cvolume_is_norm/muted() macros
pushed
> mix: Avoid redundant cvolume checks
> mix: pa_mix() is always called with more than one steam
pushed
> mix: Length over all chunk has already been computed by the caller
pushed
> core: Add volume-util.h
> core: Make use of volume macros
> iochannel: Remove unnecessary zero-initialization
pushed
> asyncmsgq: Drop weird assert
pushed
> protocol-native: Make sink_input_pop_cb() return entire chunk
> alsa-sink: Assume left_to_play can be computed, save one call to
> snd_pcm_avail()
> alsa: Refactor computation of sleep usec
> alsa: Precompute max_frames
pushed, adapted to David's comments
> alsa: Remove redundant sample_spec parameter to reset_watermark()
> function
>
> configure.ac | 13 +-
> src/modules/alsa/alsa-mixer.c | 4 +-
> src/modules/alsa/alsa-sink.c | 187 +++----
> src/modules/alsa/alsa-source.c | 135 ++---
> src/modules/alsa/alsa-util.c | 32 +-
> src/modules/bluetooth/module-bluez4-device.c | 2 +-
> src/modules/bluetooth/module-bluez5-device.c | 2 +-
> src/modules/echo-cancel/module-echo-cancel.c | 42 +-
> src/modules/echo-cancel/webrtc.cc | 10 +-
> src/modules/module-card-restore.c | 4 +-
> src/modules/module-combine-sink.c | 2 +-
> src/modules/module-device-manager.c | 12 +-
> src/modules/module-device-restore.c | 16 +-
> src/modules/module-esound-sink.c | 2 +-
> src/modules/module-null-sink.c | 2 +-
> src/modules/module-null-source.c | 2 +-
> src/modules/module-pipe-sink.c | 2 +-
> src/modules/module-pipe-source.c | 2 +-
> src/modules/module-sine-source.c | 2 +-
> src/modules/module-stream-restore.c | 12 +-
> src/modules/module-tunnel.c | 54 +-
> src/modules/oss/module-oss.c | 2 +-
> src/modules/raop/module-raop-sink.c | 2 +-
> src/pulse/context.c | 29 +-
> src/pulse/ext-device-manager.c | 14 +-
> src/pulse/ext-device-restore.c | 10 +-
> src/pulse/ext-stream-restore.c | 10 +-
> src/pulse/introspect.c | 82 +--
> src/pulse/mainloop.c | 70 +--
> src/pulse/sample.c | 18 +-
> src/pulse/sample.h | 4 +-
> src/pulse/scache.c | 10 +-
> src/pulse/stream.c | 43 +-
> src/pulse/subscribe.c | 2 +-
> src/pulsecore/asyncmsgq.c | 2 -
> src/pulsecore/flist.c | 14 +-
> src/pulsecore/flist.h | 2 +-
> src/pulsecore/iochannel.c | 37 +-
> src/pulsecore/memblock.c | 15 +
> src/pulsecore/memblockq.c | 5 +-
> src/pulsecore/mix.c | 42 +-
> src/pulsecore/mix.h | 5 +
> src/pulsecore/once.c | 18 +-
> src/pulsecore/once.h | 25 +-
> src/pulsecore/packet.c | 55 +-
> src/pulsecore/packet.h | 20 +-
> src/pulsecore/pdispatch.c | 9 +-
> src/pulsecore/protocol-native.c | 162 +++---
> src/pulsecore/pstream-util.c | 33 +-
> src/pulsecore/pstream-util.h | 2 -
> src/pulsecore/pstream.c | 734 +++++++++++++++++----------
> src/pulsecore/pstream.h | 2 +
> src/pulsecore/queue.c | 11 +
> src/pulsecore/queue.h | 3 +
> src/pulsecore/resampler.c | 45 +-
> src/pulsecore/resampler.h | 3 +-
> src/pulsecore/rtpoll.c | 46 +-
> src/pulsecore/rtpoll.h | 5 +-
> src/pulsecore/sample-util.c | 8 +-
> src/pulsecore/sample-util.h | 53 ++
> src/pulsecore/sink-input.c | 13 +-
> src/pulsecore/sink.c | 23 +-
> src/pulsecore/source-output.c | 9 +-
> src/pulsecore/source.c | 13 +-
> src/pulsecore/tagstruct.c | 67 ++-
> src/pulsecore/tagstruct.h | 4 +-
> src/pulsecore/volume-util.h | 92 ++++
> src/tests/rtpoll-test.c | 4 +-
> src/tests/srbchannel-test.c | 21 +-
> 69 files changed, 1455 insertions(+), 982 deletions(-)
> create mode 100644 src/pulsecore/volume-util.h
>
> --
> 1.9.1
>
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>
--
Peter Meerwald
+43-664-2444418 (mobile)
More information about the pulseaudio-discuss
mailing list