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 query/reply perf #781

Merged
merged 30 commits into from
Nov 13, 2024

Conversation

jean-roland
Copy link
Contributor

@jean-roland jean-roland commented Nov 11, 2024

The last perf PR before 1.1 merge into main. Include:

  • Use of resource pool for decoding:

For every message of a frame we used to allocate and free a network message and a Vec<Arc<Subslice>> of size 1 for every payload. Instead of doing that, a transport now has a Vec<network message> and a Vec<Arc<Subslice>> that can be reused from a frame to another to avoid the time lost in allocating/freeing and the fragmentation.

  • Svec use_elem_f

Svec allows to chose if we want to use the element function when we copy/move per call instead of at define.

  • Query/reply alignment with sample changes:

Query, reply and samples functions take ownership of the decoded data and free them systematically.
Queryable have a cache system similar to subscriber (that will also be moved to a lru cache in the future).
Queries are not longer an rc and holds a reference to the session instead of a weak.

@jean-roland jean-roland requested a review from sashacmc November 11, 2024 10:57
Copy link

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

@jean-roland jean-roland added the enhancement Things could work better label Nov 11, 2024
examples/unix/c11/z_get_attachment.c Outdated Show resolved Hide resolved
examples/unix/c11/z_queryable_attachment.c Outdated Show resolved Hide resolved
src/protocol/keyexpr.c Outdated Show resolved Hide resolved
@jean-roland jean-roland requested a review from sashacmc November 13, 2024 09:00
@gabrik gabrik merged commit 0f1ce95 into eclipse-zenoh:dev/1.1.0 Nov 13, 2024
53 of 54 checks passed
jean-roland added a commit to jean-roland/zenoh-pico that referenced this pull request Nov 13, 2024
* fix: remove superfluous rc init

* feat: lazify svec release

* refactor: rename slice_empty as slice_null

* feat: rework svec expand

* refactor: z_bytes_append_slice

* feat: lazify arc slice

* feat: improve stirng/slice move

* feat: lazify sample timestamp set

* feat: add non-reader decode functions

* feat: remove superfluous keyexpr clear

* feat: add bytes alias arc

* feat: add rx pool size config option

* feat: use transport arc slice pool for payload decode

* feat: n msg svec is now a transport resource pool

* fix: add offset to svec init

* feat: make svec use elem f a per call arg

* feat: skip ke suffix check

* fix: arc pool

* feat: improve sub perf and readability

* feat: add z_string_alias_slice function

* feat: align queryable with subscription

* feat: align reply with sub & queryables

* feat: nothing to clear in frame

* fix: reply clean up

* feat: streamline replies

* feat: query is not a rc and store a session rc

* fix: ci issues

* fix: attachment examples

* fix: keyexpr equals

* fix: flaky test
@jean-roland jean-roland deleted the ft_query_reply_perf branch December 5, 2024 09:44
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.

3 participants