Otherwise, with 2.12,
ByteString().toString == "ByteString.ByteString1C()"
which would expose implementation details in the string representation.
This can lead to failing tests due to test expecting a particular string
representation of a ByteString which might be bad practice, yes, but is also
convenient.
The change is due to a fix in Scala for SI-9019 for which the string representation
of TraversableLike was changed which ByteString inherits.
See https://github.com/scala/scala/pull/5258/files
* =act clean up ByteString#drop(...)
Current implementation has a good algorithm but seems a little bit complicated.
Clening-up does not suffer the performance (actually seems to have the better
performance when dropping(N-1)) where N is the length, and is easy to understand
almost the same algorithm now.
* Change private[akka] to priavte
* Rename go(...) and some variables
They should be easy for us to understand what they are.
* Add benchmark of ByteString#drop(...)
Currently, we use ByteStringBuilder to create a new ByteString instance,
which would not be quite efficient.
Instead of doing this, we can do as follows so that we can achieve better performance:
1. Seek the index of _last_ vector element we need to _take_
2. Find the number of characters left to take from the _last_ ByteString1 element.
3. Create ByteString based on the information we obtained from 1 and 2
Then we just need to create a new Vector[ByteString1] at most twice, which should be
better than the current implementation, i.e., _append_ a new element every time we check
bytestrings(Vector[ByteString1]) element, which ends up O(N) _append_ execution where _N_ is
the length of bytestrings.
* Ported the first pre-fuse part endre did in pr #1972
* Allow the same HttpServerBluePrint to materialize multiple times
HttpRequestParser now behave like a proper GraphStage (with regards to materialization)
HttpResponseParser is kept "weird" to limit scope of commit.
* TestClient method to dump with http client and curl in parallel for comparison
* Cleanup
* tightening down what can be overriden
* tightening down access modifiers
* updates according to review
* Better defaults for the test server
* Ups. Don't listen to public interfaces in test server by default.
* When all weights in the map are zero total became 0, which is not
valid in random pick. Treat this special case as empty WeightedRoutees, i.e.
no availble targets and routing to deadLetters.