Skip to content

Releases: tonsky/datascript

1.3.3

28 Dec 12:46
Compare
Choose a tag to compare

1.3.2

03 Dec 17:42
Compare
Choose a tag to compare
  • Fixed multiple reverse refs bug #412

1.3.1

29 Nov 11:28
Compare
Choose a tag to compare
  • Fixed reverse recursive pulls #411

1.3.0

26 Nov 17:36
Compare
Choose a tag to compare

New pull implementation

Pull has been a great API for a long time in Datomic and DataScript, with only one gotcha: it wasn’t performant. Up to the point where building pull tree manually using entities would outperform pull, even with all entities overhead. This seemed weird, because pull has much more information ahead of time, which could be leveraged for optimizations.

Well, you don’t have to compromise performance for convenience anymore. DataScript 1.3.0 features much faster pull implementation:

  • Up to 7 times faster than old impl
  • Up to 2,5 times faster than doing pull through entities
  • Up to 4 times faster than Datomic in-memory

Numbers depend on particular database/pattern, so don’t trust them too much!

Also in new impl:

  • Support :xform
  • Cached parse results
  • Fixed wildcard + recursion bug: [* {:child ...}] did not work before
  • A callback to track all entities touched by pull (usable for reactive dependency tracking)

Also in 1.3.0

  • Simplified benchmark code
  • Ability to override query parse cache: datascript.query/*query-cache*

Benchmark

Some raw numbers from built-in benchmark (ms per operation, lower is better).

Clojure:

Benchmark Entities Old pull New pull
pull-one 0.6 2.5 0.5
pull-many 1.9 5.4 0.8
pull-wildcard n/a n/a 1.1

ClojureScript:

Benchmark Entities Old pull New pull
pull-one 1.7 7.3 1.3
pull-many 5.2 15.1 2.2
pull-wildcard n/a n/a 2.8

Datomic in-memory:

Benchmark Entities Pull
pull-one 0.7 0.8
pull-many 2.3 2.5
pull-wildcard n/a 4.7

1.2.10

04 Nov 16:17
Compare
Choose a tag to compare
  • Fix broken wildcard pull on non-matching ref #410 thx @joodie

1.2.9

01 Nov 17:38
Compare
Choose a tag to compare

1.2.8

24 Aug 01:49
Compare
Choose a tag to compare
  • Data retracted incorrectly in CLJS #404

1.2.7

23 Aug 21:20
Compare
Choose a tag to compare
  • Data retracted incorrectly in CLJS #404

1.2.6

15 Aug 17:50
Compare
Choose a tag to compare
  • Tempid resolution fails in some cases #403

1.2.5

06 Aug 16:46
Compare
Choose a tag to compare
  • Special case Inf/-Inf and NaN in serializer since JSON can’t hold them #402