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
Added sender.send_borrowed(data), to reduce copying #161
Conversation
Someone else who has been more involved in the discussions about #156 should probably review this. |
I still don't think serde-roundtrip is a good idea, so not me.
|
@nox: Just to confirm... Stuff we agree about: having a @antrik r? |
@jdm very wise. |
FYI, this would let us reuse the allocation of BuiltDisplayLists (~1MB/frame) in webrender. |
r? @gankro then? (This PR has been languishing while I've been busy implementing worklets.) |
@asajeffrey sorry for slacking on this :-( I did glance at briefly it when you published it, and had a bunch of questions, but didn't manage to write them down at the time... Please give it another couple of days while I look into it. If I still fail to follow up, feel free to ignore me... |
@gankro doesn't Webrender use |
Since my concerns pertain to the general approach, rather than the specific pull request, I deemed it more appropriate to follow up on the discussion at #156 for now. |
☔ The latest upstream changes (presumably #164) made this pull request unmergeable. Please resolve the merge conflicts. |
Sorry I didn't follow up on this. I think I convinced myself that webrender doesn't need this, for the reasons stated by antrik. |
Closing in favour of experimenting with something like https://github.com/asajeffrey/shared-data |
For compatibility with channels, senders take ownership of their data, and drop it immediately after sending. This PR adds the ability to send borrowed data, including nested data, for example sending a
&(&str,u32)
on a sender expecting a(String,u32)
.cc @nox @antrik.
Fixes #156.