Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve throughput performance #2 (refcount focus) #737

Merged
merged 23 commits into from
Oct 14, 2024

Conversation

jean-roland
Copy link
Contributor

@jean-roland jean-roland commented Oct 12, 2024

This PR continues on the work of #730. Profiling helped identify multiple causes of performance issue, including our refcount implementation with weak pointers.

  • More static inline rework:
    Similar work to what was done previously.

  • Lazier & faster clear / initialization:
    Some types were taking time initializing or clearing things that weren't necessary. They got simplified.
    Chief of this was timestamps. A validity boolean flag was added to the struct to simplify checks & clears of the type.

  • "Simple rc" - name subject to change:
    Added back a rc implementation without weak, used only for arc_slices. Closes Add back a refcount implementation without weak feature #520

  • Add Z_FEATURE_PUBLISHER_SESSION_CHECK config token
    On by default, this can be turned off to avoid upgrading the publisher's session weak in apps where session is not dropped before it stops publishing.

  • Reworked logs from the transport/codec layer.

  • Multicast read task more tolerant:
    As pico multicast is on a best-effort transport only, a missed fragment shouldn't close the connection (it was causing tests to halt).

Copy link

PR missing one of the required labels: {'new feature', 'breaking-change', 'bug', 'documentation', 'enhancement', 'dependencies', 'internal'}

@jean-roland jean-roland added the enhancement Things could work better label Oct 12, 2024
@jean-roland jean-roland marked this pull request as ready for review October 12, 2024 09:09
src/link/link.c Outdated Show resolved Hide resolved
src/protocol/codec/declarations.c Show resolved Hide resolved
src/session/utils.c Outdated Show resolved Hide resolved
src/session/utils.c Outdated Show resolved Hide resolved
@milyin milyin merged commit 4bd2ca2 into eclipse-zenoh:dev/1.1.0 Oct 14, 2024
53 of 54 checks passed
@jean-roland jean-roland deleted the ft_rc_perf branch October 24, 2024 12:42
jean-roland added a commit to jean-roland/zenoh-pico that referenced this pull request Nov 13, 2024
…pse-zenoh#737)

* feat: more static inline

* feat: skip null string copy in encoding

* feat: add no-weak refcount

* feat: streamline vec_make

* feat: add publisher check session config token

* fix: simple rc memory leak

* feat: switch arc_slice to simple rc

* feat: add valid flag to timestamp

* feat: add timestamp_move function

* feat: switch sample_create to pass by reference

* fix: missing token on publisher_delete

* feat: update trigger subscription calls

* fix: dummy sample_create prototype

* feat: remove null timestamp value in trigger subs

* feat: optimize timestamps cost

* feat: check string before encoding move

* feat: alias instead of copy payload on decode

* doc: explicit read task errors

* doc: rework transport/codec logs

* feat: keep going on multicast message processing error

* fix: revert payload aliasing

* fix: set timestamp valid only if decode successful

* fix: review comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Things could work better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants