From 64815d0f9ea37b5effd60e1c451f7008dedad424 Mon Sep 17 00:00:00 2001 From: Kenneth Geisshirt Date: Wed, 5 Oct 2022 18:04:09 +0200 Subject: [PATCH 1/4] Upgrade to Realm Core v12.9.0 --- CHANGELOG.md | 7 +++++-- dependencies.list | 2 +- src/js_network_transport.hpp | 2 +- vendor/realm-core | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bb626a8d7..a4eb1b5979 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ ## vNext (TBD) ### Enhancements -* None +* Prioritize integration of local changes over remote changes. This shorten the time users may have to wait when committing local changes. Stop storing downloaded changesets in history. ([realm/realm-core#5844](https://github.com/realm/realm-core/pull/5844)) +* Greatly improve the performance of sorting or distincting a Dictionary's keys or values. The most expensive operation is now performed O(log N) rather than O(N log N) times, and large Dictionaries can see upwards of 99% reduction in time to sort. ([realm/realm-core#5166](https://github.com/realm/realm-core/pulls/5166)) +* Cut the runtime of aggregate operations on large dictionaries in half. ([realm/realm-core#5864](https://github.com/realm/realm-core/pull/5864)) +* Improve performance of aggregate operations on collections of objects by 2x to 10x. ([realm/realm-core#5864](https://github.com/realm/realm-core/pull/5864)) ### Fixed * If a case insensitive query searched for a string including an 4-byte UTF8 character, the program would crash. ([realm/realm-core#5825](https://github.com/realm/realm-core/issues/5825), since v1.0.0) @@ -17,7 +20,7 @@ * File format: generates Realms with format v22 (reads and upgrades file format v5 or later for non-synced Realm, upgrades file format v10 or later for synced Realms). ### Internal -* Upgraded Realm Core from v12.6.0 to v12.7.0. ([#4932](https://github.com/realm/realm-js/issues/4932)) +* Upgraded Realm Core from v12.6.0 to v12.9.0. ([#4932](https://github.com/realm/realm-js/issues/4932) and [#4983](https://github.com/realm/realm-js/issues/4983) * Added ARM/Linux build guide. ## 10.21.1 (2022-09-15) diff --git a/dependencies.list b/dependencies.list index 22e91986e6..3f73e471af 100644 --- a/dependencies.list +++ b/dependencies.list @@ -1,6 +1,6 @@ PACKAGE_NAME=realm-js VERSION=10.21.1 -REALM_CORE_VERSION=12.7.0 +REALM_CORE_VERSION=12.9.0 NAPI_VERSION=5 OPENSSL_VERSION=1.1.1g MDBREALM_TEST_SERVER_TAG=2022-06-10 diff --git a/src/js_network_transport.hpp b/src/js_network_transport.hpp index b9ac1fc3bb..1a0ddee3d9 100644 --- a/src/js_network_transport.hpp +++ b/src/js_network_transport.hpp @@ -220,7 +220,7 @@ struct JavaScriptNetworkTransport : public app::GenericNetworkTransport { return request_object; } - void send_request_to_server(app::Request&& request, + void send_request_to_server(const app::Request& request, util::UniqueFunction&& completion_callback) override { m_dispatcher([ctx = m_ctx, request = std::move(request), diff --git a/vendor/realm-core b/vendor/realm-core index 18abbb4e9d..b86d2107fe 160000 --- a/vendor/realm-core +++ b/vendor/realm-core @@ -1 +1 @@ -Subproject commit 18abbb4e9dc268620fa499923a92921bf26db8c6 +Subproject commit b86d2107fec4246b55af24a3b11e00275575f808 From 2d4d05aa0e6abb7b54cd794225179351116e60f1 Mon Sep 17 00:00:00 2001 From: Kenneth Geisshirt Date: Thu, 6 Oct 2022 12:50:45 +0200 Subject: [PATCH 2/4] Fix test --- tests/js/list-tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/js/list-tests.js b/tests/js/list-tests.js index 3f3103918e..a894da6cdc 100644 --- a/tests/js/list-tests.js +++ b/tests/js/list-tests.js @@ -1420,7 +1420,7 @@ module.exports = { if (list.type === "date") { TestCase.assertThrowsContaining(() => list.sum(), "Cannot sum 'date' array: operation not supported"); - TestCase.assertThrowsContaining(() => list.avg(), "Cannot average 'date' array: operation not supported"); + TestCase.assertThrowsContaining(() => list.avg(), "Cannot avg 'date' array: operation not supported"); continue; } From 88c61e35dd8653766e117b4b8e172f4d545cc1c0 Mon Sep 17 00:00:00 2001 From: Kenneth Geisshirt Date: Thu, 6 Oct 2022 14:14:46 +0200 Subject: [PATCH 3/4] Update CHANGELOG.md Co-authored-by: Tom Duncalf --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4eb1b5979..95d9e9868f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ ## vNext (TBD) ### Enhancements -* Prioritize integration of local changes over remote changes. This shorten the time users may have to wait when committing local changes. Stop storing downloaded changesets in history. ([realm/realm-core#5844](https://github.com/realm/realm-core/pull/5844)) +* Prioritize integration of local changes over remote changes. This shortens the time users may have to wait when committing local changes. Stop storing downloaded changesets in history. ([realm/realm-core#5844](https://github.com/realm/realm-core/pull/5844)) * Greatly improve the performance of sorting or distincting a Dictionary's keys or values. The most expensive operation is now performed O(log N) rather than O(N log N) times, and large Dictionaries can see upwards of 99% reduction in time to sort. ([realm/realm-core#5166](https://github.com/realm/realm-core/pulls/5166)) * Cut the runtime of aggregate operations on large dictionaries in half. ([realm/realm-core#5864](https://github.com/realm/realm-core/pull/5864)) * Improve performance of aggregate operations on collections of objects by 2x to 10x. ([realm/realm-core#5864](https://github.com/realm/realm-core/pull/5864)) From 2cc8df7854397daa495645520b22d26d8e4badb3 Mon Sep 17 00:00:00 2001 From: Kenneth Geisshirt Date: Thu, 6 Oct 2022 15:33:44 +0200 Subject: [PATCH 4/4] Fix RPC network transport --- src/jsc/jsc_rpc_network_transport.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jsc/jsc_rpc_network_transport.hpp b/src/jsc/jsc_rpc_network_transport.hpp index f365757610..a723e880ec 100644 --- a/src/jsc/jsc_rpc_network_transport.hpp +++ b/src/jsc/jsc_rpc_network_transport.hpp @@ -58,7 +58,7 @@ struct RPCNetworkTransport : public app::GenericNetworkTransport { { } - void send_request_to_server(app::Request&& request, + void send_request_to_server(const app::Request& request, util::UniqueFunction&& completion_callback) override { // Build up a JS request object