Skip to content

Releases: zio/zio-query

v0.7.6

15 Sep 06:35
6c073f9
Compare
Choose a tag to compare

This tiny release improves interop with ZIO effects by adding the following methods to the ZQuery API: catchAllZIO, catchAllCauseZIO, foldZIO, and foldCauseZIO.

What's Changed

Full Changelog: v0.7.5...v0.7.6

v0.7.5

25 Aug 17:53
70ea00d
Compare
Choose a tag to compare

This tiny release adds support for Scala Native and optimizes the performance of datasource-backed queries

What's Changed

Full Changelog: v0.7.4...v0.7.5

v0.7.4

10 Jul 16:03
83f28d8
Compare
Choose a tag to compare

This minor release contains performance improvements for short-lived queries, but more importantly, queries that heavily utilize ZQuery.fromRequest. It is also fully binary compatible with the v0.7.x series.

What's Changed

  • Improve performance of ZQuery#run by @kyri-petrou in #497
  • Update README.md by @zio-assistant in #498
  • Use a single FiberRef for retrieving the Cache and identifying disabled caching by @kyri-petrou in #495
  • Make ZQuery#run reentrant safe by @kyri-petrou in #499

Full Changelog: v0.7.3...v0.7.4

v0.7.3

01 Jul 10:01
a57ea1d
Compare
Choose a tag to compare

This very minor release contains performance optimizations for queries that rely heavily on deduplication of requests.

And it is fully binary and source compatible with the v0.7.x series!

Highlights

  • Avoid unnecessary creation of Both / Then when BlockedRequests == Empty by @kyri-petrou in #494

Other changes

Full Changelog: v0.7.2...v0.7.3

v0.7.2

25 Jun 01:41
6dc46c9
Compare
Choose a tag to compare

This minor release adds new eager ZQuery.*Now constructors (e.g., ZQuery.succeedNow) that allow users to lift pure values into a ZQuery. Eagerly constructed queries allow for more aggressive under-the-hood optimizations at the cost of not capturing side-effects. As such, they should only ever be used for lifting pure values, and never in recursive methods!

Highlights

Other changes

Full Changelog: v0.7.1...v0.7.2

v0.7.1

08 May 11:32
8beeefd
Compare
Choose a tag to compare

This release brings some new constructors and methods that extend ZQuery's functionality as well as some minor performance improvements.

Highlights

Other changes

Full Changelog: v0.7.0...v0.7.1

v0.7.0

12 Apr 04:44
37d358a
Compare
Choose a tag to compare

Release Notes

This release focuses heavily on improving the performance of query execution for DataSource-backed queries. Applications that heavily rely on ZQuery.fromRequest for batching a large number of requests should see a notable improvement in performance. In v0.6.x, batching of ~1,000 unique requests to a single datasource would take approximately 1ms of CPU time according to our benchmarks. With this new release, batching of the same number of requests takes ~200-250us (~x4-5 improvement) 🚀

New additions

  • Added multiple new constructor methods for CompletedRequestMaps. If your code relies on creating custom DataSources, make sure to check them out! (see section below for more info)
  • Added an overload to Cache.empty that allows pre-sizing the underlying cache. This can improve performance in cases where there are a large number of requests

Deprecations

In order to improve performance as much as possible, the internals of Cache and CompletedRequestMap were re-written to utilize mutable data structures, which offer much better performance than immutable ones. In order to avoid mutability leaking into existing user's code, the ++, insert and insertOption on CompletedRequestMap remain immutable but have been deprecated as they'll lead to sub-optimal performance.

Users that construct DataSource and CompletedRequestMap manually, should migrate their existing code to use one of the many new constructors added in the CompletedRequestMap companion object instead. See below for some migration examples:

Single request:

val request = ???

// v0.6.x
CompletedRequestMap.empty.insert(request, Exit.succeed(value))

// v0.7.0
CompletedRequestMap.single(request, Exit.succeed(value))

Iterable of (request, value):

case class GetId(id: UUID) extends Request[Nothing, GetId]
case class Response(value: String)
val keysAndValues: List[(UUID, String)] = ???

// v0.6.x
keysAndValues.foldLeft(CompletedRequestMap.empty) { case (map, (k, v)) => map.insert(GetId(k), Response(v)) }

// v0.7.0
CompletedRequestMap.fromIterableWith(keysAndValues)(kv => GetId(kv._1), kv => Response(kv._2))

All changes

Full Changelog: v0.6.1...v0.7.0

v0.6.1

29 Mar 06:57
170b25c
Compare
Choose a tag to compare

Release Notes

This release brings a new set of constructors for CompletedRequestMap, which allow create one from iterables. It also includes an important bug fix that caused significant performance degradation of queries composed of parallel and sequential datasource-based queries. It is fully backwards compatible with v0.6.0

New additions

Performance improvements and fixes

  • Fix issue with parallel queries being executed multiple times if zip is used by @kyri-petrou in #464
  • Avoid filtering requests when CompletedRequestsMap is empty by @kyri-petrou in #466

Other changes

  • Update README.md by @zio-assistant in #461
  • Add benchmark to compare performance with Fetch by @kyri-petrou in #463
  • Check binary compatibility using MiMa & update dependencies by @kyri-petrou in #462

New Contributors

Full Changelog: v0.6.0...v0.6.1

v0.6.0

12 Dec 23:41
7cdd3fe
Compare
Choose a tag to compare

This release changes the signature of Request to be invariant. This increases the type safety of queries but may mean the compiler is stricter in enforcing that in some cases. In connection with this, the signature of CompletedRequestMap#insert has been updated to not be curried for improved type inference. If you are using higher level constructors to define your data sources this change should not impact you.

What's Changed

New Contributors

  • @zio-assistant made their first contribution in #454

Full Changelog: v0.5.1...v0.6.0

0.5.1

28 Sep 00:32
470a29d
Compare
Choose a tag to compare

This release contains dependency updates.