Commit Graph

570 Commits

Author SHA1 Message Date
Rafael Weinstein a34a444f42 Fix cache/value store caching (#3111)
* Fixes a long standing bug in which the RemoteBatchStore is accidentally caching all chunks
* ValueStore's value cache now stores `Promise<?Value>` so that concurrent `readValues` of the same value can share a single decoding
* Removes the debug-only chunk hash check which keeps tripping up perf investigations
2017-01-25 14:41:15 -08:00
Rafael Weinstein edf8b55f26 dont use read ahead for map.first/last (#3110) 2017-01-24 13:12:09 -08:00
Aaron Boodman 7e5af655e7 bump version because of format version change (#3107) 2017-01-23 15:50:32 -08:00
Mike Gray c7ae4b31fe Fix warning of unmet peer dependency (#3105) 2017-01-23 17:39:46 -05:00
cmasone-attic 6e72c137a2 Make database root a Map<String, Ref<Value>> (#3093)
Since the head of each dataset can have an arbitrarily complex
type, type accretion leads the Datasets map at the root of the
DB to become very large. This type info isn't really very useful
at that level either. So, get rid of it by making this map be
from String -> Ref<Value>.

Fixes #2869
2017-01-22 11:17:17 -08:00
Erik Arvidsson d4132e9e6c Use cp instead of ln (#3100) 2017-01-20 18:41:56 -08:00
Erik Arvidsson e90bfcbd2a Switch to Yarn (#3092)
brew install yarn
2017-01-20 11:42:32 -08:00
Erik Arvidsson 6fd186d060 Update to a newer documentationjs (#3088) 2017-01-19 11:38:16 -08:00
Aaron Boodman 801dde854a Remove all the old js samples. They are no longer needed. (#3086) 2017-01-18 21:24:34 -08:00
Aaron Boodman a5a11f5345 Bump Noms JS SDK version to 68.3.0 for perf improvements (#3085) 2017-01-18 17:40:05 -08:00
Rafael Weinstein 86e812a5db (JS) Don't preload iterators (#3078)
dont preload iterators
2017-01-17 13:49:22 -08:00
Erik Arvidsson 2dfb4040b7 Update to Flow 0.36 (#3079) 2017-01-17 11:56:20 -08:00
Rafael Weinstein 759c36c96f Walk avoids blobs (#3074) 2017-01-13 16:32:40 -08:00
Rafael Weinstein 760e7f9945 (JS) Implement parallel walk io (#3070)
(JS) Implement parallel walk io
2017-01-12 15:57:02 -08:00
Erik Arvidsson 554d4da885 Upgrade to use latest webpack-config (#3066) 2017-01-11 18:47:22 -08:00
Erik Arvidsson 15f188ac2c webpack-config: Pick up noms version next (#3065)
Make sure we replace process.env.NOMS_VERSION_NEXT for webpack builds
2017-01-11 17:58:23 -08:00
Erik Arvidsson 2f6f760658 Work around environment variable issue. (#3061)
We are using babel-plugin-transform-inline-environment-variables which
replaces `process.env.FOO` with the value of the `FOO` environment
variable at compile time.

However, due to our pipeline we end with something like:

```js
var NAME = 'NOMS_VERSION_NEXT';
process.env[NAME]
```

which does not get replaced in development mode. If it was a const the
transformer could replace it but var bindings can change.
2017-01-11 15:08:04 -08:00
Aaron Boodman c885ace18f Bump js package again. (#3056)
I had already used 66 in a previous commit that was reverted.
2017-01-10 18:09:50 -08:00
Aaron Boodman 377e730bd2 Bump js package version because of noms format change. (#3055) 2017-01-10 15:53:22 -08:00
Rafael Weinstein 01303a828d go read ahead (#3046) 2017-01-10 15:28:26 -08:00
Aaron Boodman c5805766f5 Enable v8 by default (#3045) 2017-01-10 14:43:55 -08:00
Aaron Boodman a09ef6fb44 Revert "Introduce noms version 8. Use it to guard type simplification." (#3043) 2017-01-09 16:30:25 -08:00
Aaron Boodman a4ffa5ba9b Introduce noms version 8. Use it to guard type simplification. (#3035)
Introduce noms version 8. Use it to guard type simplification.
2017-01-06 17:32:32 -08:00
Ben Kalman 528355c9be Write sequence read-ahead cache to correct index (#3025) 2017-01-06 09:52:47 +11:00
Erik Arvidsson 1e0a698781 Type accretion for struct fields should use equal (#3029)
We used to use isSubtype but we should just create a more specific type
when we can.

Fixes #2993
2017-01-05 13:57:42 -08:00
Aaron Boodman 5617c15489 Add support for IsSubtype(T, A|B|...) (#3024) 2017-01-04 21:55:36 -08:00
cmasone-attic cf452aab07 JS: ValueStore writes chunks only when referenced (#3021)
The old strategy for writing values was to recursively encode them,
putting the resulting chunks into a BatchStore from the bottom up as
they were generated.

The new strategy tries to keep chunks from the same 'level' of a
graph together by caching chunks as they're encoded and only writing
them once they're referenced by some other value. When a collection
is written, the graph representing it is encoded recursively, and
chunks are generated bottom-up. The new strategy should, in practice,
mean that the children of a given parent node in this graph will be
cached until that parent gets written, and then they'll get written
all at once.
2017-01-04 15:05:46 -08:00
Rafael Weinstein e025471eab Remember hints for written chunks (#3017)
Prior to this patch, ValueStore only kept a record of where referenced Refs originally reside in from chunks read from the server. This ignored the case of a client doing subsequent commits with the same ValueStore (for example, writing multiple states of a map). This was resulting in the server being forced to load a ton of chunks to validate.
2017-01-04 13:58:44 -08:00
Ben Kalman 129b07818a Noms JS version 65.5.0 (#3011) 2017-01-04 14:18:40 +11:00
Ben Kalman be2e714545 Implement @at in JS paths (#3010) 2017-01-04 11:58:08 +11:00
Ben Kalman 9b149516ef Implement JS Map and Set at() (#3009) 2017-01-04 11:31:09 +11:00
Ben Kalman f83e5b5b9c Refactor JS path code and implement @type (#3003)
This brings it much closer to the Go implementation, and eventually
implementing the @at annotation.
2017-01-04 09:32:07 +11:00
Rafael Weinstein e0d8445ccd Js sequence refactor (#2998)
Removes IndexedSequence and OrderedSequence. What remain are MetaSequence and each of the leaf sequences which directly inherit from Sequence.
2017-01-03 14:03:17 -08:00
Erik Arvidsson ed1e386e24 JS: Make equals and compare exit early if === (#2951) 2016-12-22 13:38:57 -08:00
Rafael Weinstein 206eb6a38d Remove import of isPrimitiveKind 2016-12-20 17:04:56 -08:00
Rafael Weinstein cb3390924f Remove unnecessary invariants (#2966)
Remove unnecessary invariants
2016-12-20 15:52:26 -08:00
Erik Arvidsson 80d4894fcc JS: Fix walk
The promise was resolving too early.
2016-12-09 18:51:49 -08:00
Aaron Boodman fe59ae9504 Revert "Fix JS walk handling for values of type Type (#2913)" (#2931)
This reverts commit 2717908d2b.
2016-12-09 17:43:26 -08:00
Rafael Weinstein 88691863f4 Add simple read ahead for JS Collections (#2930)
Adds the ability for SequenceCursors to eagerly load all child sequences when the first child is requested.

The effect is for uses where noms tends to forward scan, it will read in batches of ~150 chunks (e.g. ~512k) rather than one chunk at a time.

On my MBP, this improves the raw blob read perf over http from ~60K/s to ~5MB/s.
2016-12-09 16:08:38 -08:00
Erik Arvidsson 741563958d Remove again and again 2016-12-09 12:46:54 -08:00
Erik Arvidsson 27267581d5 Again and again (#2929) 2016-12-09 12:16:05 -08:00
Erik Arvidsson a59463e277 Remove testing again 2016-12-09 12:07:47 -08:00
Erik Arvidsson e438145f14 Testing again (#2928) 2016-12-09 11:52:46 -08:00
Erik Arvidsson 559393f0b3 Revert "testing" (#2927) 2016-12-09 11:28:03 -08:00
Erik Arvidsson c58a215415 testing (#2926) 2016-12-09 11:23:36 -08:00
Erik Arvidsson bde471f690 JS: Do not validate struct type when reading a chunk (#2923)
When we read a chunk and create structs we were validating that the
struct was of the type it claimed to be.

This now, no longer does that validation, which matches Go.
2016-12-09 10:38:10 -08:00
Aaron Boodman 7a2c4f4984 Turn off chunk validation in production mode (#2925) 2016-12-09 10:32:13 -08:00
Erik Arvidsson 2717908d2b Fix JS walk handling for values of type Type (#2913)
Fixes #2911
2016-12-08 16:38:10 -08:00
Rafael Weinstein a67bb9bf7b Minor rework of hash.Hash API (#2888)
Define the hash.Hash type to be a 20-byte array, rather than embed one. Hash API Changes: `hash.FromSlice` -> `hash.New`, `hash.FromData` -> `hash.Of`
2016-12-02 12:11:00 -08:00
Erik Arvidsson 3a963602d2 Update Noms JS SDK to use Flow 0.35 (#2890) 2016-12-01 17:52:30 -08:00