Commit graph

43 commits

Author SHA1 Message Date
Christopher Batey
009214ae07
Update copyright to 2018 (#24241) 2018-01-04 17:26:29 +00:00
Johan Andrén
7a0e5b31f8 Avoid Array.ofDim where possible #22516 2017-03-13 17:49:45 +01:00
Johan Andrén
28d96a2e59 Fix invalid ranges in ByteStringSpec #22389 2017-02-24 10:26:42 +01:00
Philippus Baalman
6c7085252a extended copyright into 2017 2017-01-04 17:37:15 +01:00
monkey-mas
c38d3850a2 =act improve ByteString#dropRight(...) (#21439)
#21439: =act improve ByteString#dropRight(...)
2016-12-06 15:51:11 +01:00
Johannes Rudolph
97bada7deb =act #21774 fix ByteString.toString to use fixed stringPrefix for all subclasses (#21775)
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
2016-11-17 15:51:36 +01:00
Johan Andrén
50370c69a3 ByteString.indexOf optimized to speed up framing stage #21530 2016-10-19 11:26:50 +02:00
monkey-mas
19dbe9a487 =act clean up ByteString#drop(...) (#21440)
* =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(...)
2016-10-05 09:25:34 -05:00
monkey-mas
f8f8828451 =act improve ByteString#take(...) (#21438)
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.
2016-09-21 20:40:54 -07:00
Konrad Malawski
fb45dd03f3 =act #21237 fix regression in ByteString.slice (#21294)
* =act #21237 fix regression in ByteString.slice

* Update ByteStringSpec.scala
2016-08-29 09:38:09 +01:00
Johan Andrén
d3df2e5ed3 =act ByteString deserialization unbroken for large bytestrings #20901 (#21096) 2016-08-03 16:20:59 +02:00
Johan Andrén
9dc474a10a Pre-fuse http server layer (#20990)
* 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.
2016-07-22 14:07:41 +02:00
Konrad Malawski
fde9d86879 ByteString optimisations of methods in HTTP parsing hot-path (#20994)
* =act #20992 prepare benchmarks for ByteString optimisations

* =act #20992 optimise common ByteString operations: drop,take,slice...

* =act,htc #15965 add ByteString.decodeString(java.nio.charsets.Charset)
2016-07-20 14:01:51 +02:00
Konrad Malawski
d3ea9e49db =htp cache default RejectionHandler instance, it's safe to share (#20996) 2016-07-20 12:18:52 +02:00
Björn Antonsson
c66ce62d63 Update to a working version of Scalariform 2016-06-02 22:12:36 +02:00
Johan Andrén
62e30b3c08 Update copyrights and links to the new company name #19851 2016-02-23 12:58:39 +01:00
Prayag Verma
b7783968a0 =pro #19068 All copyrights ranges and single years updated to a range ending in 2016 2016-01-25 10:20:30 +01:00
hepin
e0f06fdee7 +act #13516 add getByteString and getBytes method with a given length 2015-04-21 14:33:48 +08:00
Konrad Malawski
8ad51fba39 Merge pull request #17144 from colinrgodsey/15170-bytestringser-2
ByteString serialization
2015-04-08 11:44:03 +02:00
Colin Godsey
1984a76195 =act #15170 bytestring serialization 2015-04-07 09:34:21 -05:00
hepin
954a86bf80 -#15825 add isEmpty and nonEmpty to ByteStringBuilder 2015-03-28 13:39:46 +08:00
Julian Tescher
00f6a58e7c Changes all occurances of Typesafe copyright to extend to 2015 2015-03-10 14:12:19 -07:00
Björn Antonsson
179faba453 =all #3837 Make akkaScalaNightly compile on scala 2.11.0-M8 2014-01-31 14:13:02 +01:00
Björn Antonsson
003609c9c5 =pro #3759 Changed to using non-deprecated ScalaTest Matchers 2013-12-18 11:32:51 +01:00
Patrik Nordwall
0afe653fe1 =clu #3517 Guard against wrong random selection
* 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.
2013-08-16 12:04:42 +02:00
Viktor Klang
6783bb2729 #3520 - fixing putLongParts in ByteStringBuilder and adding tests 2013-08-06 02:14:07 +02:00
Viktor Klang
c883705242 #3018 - Enabling -Xlint and dealing with the situation that occurs 2013-03-29 01:43:17 +01:00
Viktor Klang
950d19a377 #3153 - 'Fixing' the ByteStringSpec by not having it generate now illegal combinations of data for copyToArray 2013-03-14 20:10:03 +01:00
Viktor Klang
647c128aaa Making it easier to understand where the SerializeSpec fails 2013-01-28 23:08:17 +01:00
Viktor Klang
2f86107b10 #2913 - Adding asByteBuffers to ByteString 2013-01-28 14:42:53 +01:00
Roland
a15900a591 port onto SBT-0.12 branch 2012-08-22 11:10:36 +02:00
Oliver Schulz
b6b117cf54 Improved ByteString.{head,tail,last, init} and added missing tests 2012-06-17 22:18:51 +02:00
Oliver Schulz
2ed00f0936 Removed some superfluous braces. 2012-06-15 17:27:27 +09:00
Oliver Schulz
91ff7a29b9 Completed ByteString tests in ByteStringSpec 2012-06-12 15:03:07 +09:00
Oliver Schulz
e01e324c80 Extended ByteStringBuilder tests in ByteStringSpec 2012-06-12 15:01:16 +09:00
Oliver Schulz
f01d5c619e Completed ByteIterator tests in ByteStringSpec 2012-06-12 15:01:06 +09:00
Oliver Schulz
7231b48c05 Added tests for Float/Double encoding/decoding to ByteStringSpec 2012-06-12 15:00:35 +09:00
Oliver Schulz
3c9409a4b0 Added test for ByteString.compact to ByteStringSpec 2012-05-31 00:48:56 +02:00
Oliver Schulz
85b92b9547 Improved ByteStringSpec tests for iterator.{span, takeWhile, dropWhile} 2012-05-30 00:02:49 +02:00
Oliver Schulz
ff57958688 Workaround in ByteStringSpec for Scala-2.9 iterator.span bug 2012-05-30 00:02:49 +02:00
Oliver Schulz
0aff0ff101 Added lots of missing tests to ByteStringSpec 2012-05-30 00:02:42 +02:00
Oliver Schulz
76dab6354e Added ByteIterator 2012-05-18 01:09:00 +02:00
Derek Williams
dabf14ef4b Basic scalacheck properties for ByteString 2011-06-19 16:32:21 -06:00