mdedetrich commented on issue #995: URL: https://github.com/apache/incubator-pekko/issues/995#issuecomment-1902258797
> One problem with adding toInputStream is that we won't be able to use it in pekko-http because we'll want pekko-http to still be able to use pekko-core 1.0.x - and presuambly, we wouldn't backport this to 1.0.x > > Looking a pekko-http, I think we could improve performance by calling ByteString.toArrayUnsafe instead of toArray. Pekko-http only uses the byte[] to create a ByteArrayInputStream and this won't mutate the byte[] (but it doesn't clone it either). > > That change would save us from cloning the array like ByteString.toArray does. See the hpack code link in the issue description. > > So what I think I'm saying is do this ByteString change but also do a separate pekko-http change that doesn't use this change yet. There are many ways we can save this problem - Force Pekko-Http to use Pekko 1.0.x (thats what the `minVersion` is meant to specify) - Use reflection to detect if the method doesn't exist, and if it doesn't then pekko-http can use its own inner sourced variant I would say even backporting this to Pekko 1.0.x wouldn't entirely solve the issue and hence gives a false sense of semver considering that it wouldn't work for the earlier versions of Pekko 1.0.x -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For additional commands, e-mail: notifications-h...@pekko.apache.org