Commit graph

93 commits

Author SHA1 Message Date
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
Patrik Nordwall
54f5b836fc Merge branch 'master' into wip-merge-to-master-patriknw 2016-09-29 13:56:37 +02: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
c20b6088cd =art add metadata field to the header, #20703 2016-09-16 18:13:23 +02:00
kenji yoshida
95d13d4771 =act fix typo in ByteString#take error message (#21366) 2016-09-05 11:05:34 +02: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
Konrad Malawski
bb701d1725 HTTP: Optimise response rendering and response parsing (#21046)
* +htp,ben HttpBlueprint benchmark

* +act bring OptionVal from artery-dev
+htc raw benchmarks

* =htc request parsing benchmark

* +htc,ben add benchmark for longer (raw) json response

* =htc optimise renderHeaders, less Option allocs

* -htc remove FastClock, not quite worth it
2016-07-28 22:32:40 +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
55e3e123b1 =act #20910 optimize ByteString#copyToBuffer (#20911) 2016-07-11 18:23:52 +02:00
Björn Antonsson
c66ce62d63 Update to a working version of Scalariform 2016-06-02 22:12:36 +02:00
Alexey Noskov
2150dabdc9 Eliminate double-copy of byte array when creating ByteString with varargs 2016-04-02 12:39:12 +03: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
Konrad Malawski
9abb1eaea6 +act #19085 adds Java API ByteString#createBuilder 2015-12-04 13:07:56 +01:00
Patrik Nordwall
d8ef6b358a =act #17898 Limit length of ByteString.toString 2015-08-18 10:40:17 +02:00
Patrik Nordwall
740f006a38 +act #17576 Support serializer with string manifest
* useful when evolution is needed, e.g. Akka Persistence

* docs, comments, cluster-metrics and cluster-tools serializers
2015-06-01 13:45:31 +02: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
Konrad Malawski
faefc32237 Merge pull request #17086 from hepin1989/master
#15825 add isEmpty and nonEmpty to ByteStringBuilder
2015-04-02 10:57:47 +02:00
Konrad Malawski
71529cb4b5 Merge pull request #17069 from colinrgodsey/colinrgodsey-17028-2
optimized temp buffer for IndexedSeq
2015-03-30 17:07:22 +02:00
hepin
954a86bf80 -#15825 add isEmpty and nonEmpty to ByteStringBuilder 2015-03-28 13:39:46 +08:00
Colin Godsey
8aa610a2aa optimized tmp buffer for IndexedSeq
Avoid resizing and potentially copying the tmp buffer for IndexedSeqs
larger than the tmp buffer
2015-03-24 16:53:10 -05:00
Julian Tescher
00f6a58e7c Changes all occurances of Typesafe copyright to extend to 2015 2015-03-10 14:12:19 -07:00
Andrei Pozolotin
6332f888ce +all #16632 Make serialization identifiers configurable in reference.conf 2015-03-05 11:55:05 -06:00
Konrad Malawski
4da2593de5 +act adds missing java api for byte string 2015-03-02 09:00:33 +01:00
Mathias
fc20042d03 =act Add putByteArrayUnsafe optimization to ByteStringBuilder 2014-05-21 10:18:31 +02:00
Adam Voss
cce29dfa51 Changes all occurances of Typesafe copyright to extend to 2014. 2014-02-04 21:20:09 -06:00
Viktor Klang
6783bb2729 #3520 - fixing putLongParts in ByteStringBuilder and adding tests 2013-08-06 02:14:07 +02:00
Roland
d794b14b2b implement and document Pipelines, see #3174
- heavily inspired by spray.io.Pipeline
- fully functional style: a stage returns the resulting commands and
  events, which makes it impossible to mess with the pipeline from the
  inside
- object allocations are optimized away for emtpy and 1-elem results
- added type-safety, verifying that stages match up
- management commands “from the side” for configuration or async events
- full Java API and docs
2013-04-08 20:57:04 +02:00
Roland
bcfbea42c1 fix formatting of Java API in doc comments + genjavadoc 0.3 2013-03-07 09:05:55 +01:00
Viktor Klang
2f86107b10 #2913 - Adding asByteBuffers to ByteString 2013-01-28 14:42:53 +01:00
Viktor Klang
adfeb2c1f0 #2879 - updating copyright info 2013-01-09 11:38:00 +01:00
Viktor Klang
24566c167c #2673 + #2674 - Seq[Byte] becomes ByteString and Frame gets removed, lots of cleanup in ZMQ API 2012-12-14 18:25:04 +01:00
Viktor Klang
af8ce260d3 Correcting erronous code links 2012-07-25 13:26:33 +02:00
Viktor Klang
52d33113d9 Partial work + broken commit 2012-07-04 15:25:30 +02:00
Viktor Klang
6fb06ee46b Merge with master and adding copyright notices on the osgi stuff 2012-07-01 22:31:39 +02:00
Oliver Schulz
777addc66c Merge branch master into bs-iterators
Resolved Conflicts:
	akka-actor/src/main/scala/akka/util/ByteString.scala
2012-07-01 17:29:12 +02:00
Oliver Schulz
20e313e6a5 Removed final specifier on some ByteString and ByteIterator methods 2012-06-17 22:22:40 +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
3b67a4fdef Added explicit apply method with return type Byte to class ByteString
This is necessary to prevent boxing/unboxing of Bytes on apply.
2012-06-17 22:11:55 +02:00
Oliver Schulz
394cce0af4 Simplified implementation of ByteStringBuilder.asOutputStream 2012-06-17 17:58:20 +02:00
Oliver Schulz
2ed00f0936 Removed some superfluous braces. 2012-06-15 17:27:27 +09:00
Oliver Schulz
a87faade06 Fixed serious bug in ByteStringBuilder.++= 2012-06-12 15:01:16 +09:00
Oliver Schulz
5b83dc366e Removed unnecessary implementations of ByteString.clone
* As all ByteString implementations are immutable, an explicit override
  of Object.clone doesn't seem necessary.
2012-05-31 00:44:21 +02:00
Oliver Schulz
b285b0821f Made things that don't need to be public private in ByteString / -Iterator 2012-05-31 00:39:15 +02:00