Commit Graph

17 Commits

Author SHA1 Message Date
Mike Gray f94b91a5d2 sequences return a compare func used for diffs (#1771) 2016-06-09 23:17:14 -04:00
Chris Masone 31e25ffc81 Go: Allow serialization of a single Chunk without a Chunk serializer
In datas/put_cache.go, we need to serialize one chunk at a time. With
the old API, this entailed creating a serializer (which creates some
channels and a goroutine) only to use it for one Chunk.

Instead, just expose Serialize() and use it directly.
2016-06-09 12:54:27 -07:00
Rafael Weinstein d4941f6b1e Hash compare uses bytes.Compare (#1765) 2016-06-08 17:25:52 -07:00
Chris Masone 42cb294b57 Go: writeValue/ payload uses snappy instead of gzip
We determined that gzipping the entire writeValue payload at Commit-
time was extremely time-expensive. After doing some experiments, it
seems that a couple of changes make Commit go a lot faster:

1) Use snappy instead of gzip
2) Compress chunks individually instead of delaying until the whole
   stream is ready.

This does result in more data needing to be sent over the network.
However, we get to the point of being able to send data _much_ sooner.

Since Chunks are compressed individually, the orderedChunkCache code
now compresses them before storing them, also saving disk space.
2016-06-08 15:46:08 -07:00
cmasone-attic 39bc733a63 Go: Stop treating a chunk's hash as a hint for itself (#1758)
At some point, the Go ValueStore code started caching the hash of a
Chunk as a validation 'hint' for the Chunk itself.  JS never did
this. This must have addressed some edge case back when it was fatal
for validation code to run across a Chunk it hadn't seen and didn't
have a hint for. The downside is that doing this can cause us to send
a hint for every novel Chunk present in a writeValue payload in the
worst case.

Since I can't remember the edge case, and that edge case will no
longer be fatal anyway, removing this to avoid the (potentially
terrible) downside makes sense.
2016-06-08 15:36:16 -07:00
Rafael Weinstein 10482e26e4 Remove postRefs end point (#1761) 2016-06-08 15:23:05 -07:00
Erik Arvidsson 5571e0bc6f Add commas to HRS of struct type (#1759)
This makes the struct more consistent with the rest.
2016-06-08 14:54:47 -07:00
Mike Gray 4303450a7e fixing bug #1723, diff being slow (#1748)
fixing bug #1723, diff was slow due to an incorrect comparison of metaTuple values
2016-06-08 14:44:09 -07:00
Erik Arvidsson d13dc6a2c5 HRS: No need to tag numbers any more (#1760) 2016-06-08 14:42:37 -07:00
cmasone-attic 00af81440f Move Go profiling helpers out of samples/ (#1757)
These are used in cmd as well, so it seemed weird to have
them over in samples/util
2016-06-08 14:26:44 -07:00
Erik Arvidsson bc896efcc5 Add tests for type after mutations (#1753)
Also, remove invariant for set intersection. We can handle different
types now.

Fixes #1749
2016-06-08 11:39:12 -07:00
cmasone-attic 74a0c98d75 Go: Use unified ref-height-based Pull algorithm (#1722)
Change Dataset.Pull to use a single algorithm to pull data from a
source to a sink, regardless of which (if any) is local. The basic
algorithm is described in the first section of pulling.md. This
implementation is equivalent but phrased a bit differently. The
algorithm actually used is described in the second section of
pulling.md

The main changes:
- datas.Pull(), which implements the new pulling algorithm
- RefHeap, a priority queue that sorts types.Ref by ref-height and
  then by ref.TargetHash()
- Add has() to both Database implementations. Cache has() checks.
- Switch Dataset to use new datas.Pull(). Currently not concurrent.

Toward #1568


Mostly, prune reachableChunks
2016-06-08 08:57:48 -07:00
Erik Arvidsson abbd0cfb1e JS: Make Structs use arrays (#1743)
...instead of objects as maps.

Fixes #1715
2016-06-07 15:59:27 -07:00
Erik Arvidsson bc9f9d19e1 Go: Make StructDesc use slices for names and types instead of a map (#1741)
The map showed up in benchmarks...

Fixes #1716
2016-06-06 16:58:40 -07:00
Mike Gray 9763c25d93 reduce memory usage in index sequence diff (#1736) 2016-06-06 15:41:25 -04:00
Aaron Boodman ef4bf7811c Move nomdl to go/ 2016-06-05 02:23:09 -07:00
Aaron Boodman bb7ac52265 Move the Go SDK into noms/go 2016-06-05 02:14:49 -07:00