Skip to content

Conversation

@antiguru
Copy link
Member

@antiguru antiguru commented Feb 8, 2026

Rendering sometimes brings collections into regions, or out of regions where nothing consumes the stream. This causes us to clone the contents even though they'll be dropped immediately, wasting CPU time. This change doesn't address this problem, but mitigates its cost. Cloning an Rc is cheaper than cloning a vector.

Rendering sometimes brings collections into regions, or out of regions
where nothing consumes the stream. This causes us to clone the contents
even though they'll be dropped immediately, wasting CPU time. This
change doesn't address this problem, but mitigates its cost. Cloning
an Rc is cheaper than cloning a vector.

Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
@antiguru antiguru marked this pull request as ready for review February 8, 2026 01:16
@antiguru antiguru requested a review from a team as a code owner February 8, 2026 01:16
@antiguru
Copy link
Member Author

antiguru commented Feb 9, 2026

The PR avoids the problem of cloning the data and replaces it by cloning the reference:
image

Unfortunately, it adds many shared/unshared operators:

image

This one shared for putting data into a collection bundle, and one unshared for taking it out, pretty much two (data, error) for each collection imported into an LIR node. I wonder if the cost of this is too high.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant