-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
introduces sollid batching for loadMessagesViaPlugin #2821
Conversation
🦋 Changeset detectedLatest commit: 64e30ee The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This PR should give the same result for the last signal produced by the SDK when multiple messages updated via the filesystem. @LorisSigrist this should reduce the getAll() noise you are facing in paraglide @felixhaeberle can you check vs code extensions reactivity based on getAll |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fink never updates multiple messages at once atm. Even after a mergeUpstream
or after a settings update we refetch the repo or project. That means we're good to go.
Sounds that this is the same with Sherlock, although this can change in the future. 👍 lgtm from Sherlock side 🕵️♂️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
With this PR I could load and translate 10k messages - but crashed OOM with 20k.
Previously the number of getAll() events took a long time to resolve, but we didn't crash. I think the new model is better, so 👍 to merge this and help apps like paraglide.
(code was easier to look at with hide-whitespace enabled in github PR viewer)
Great - the memory consumption will be mitigated by https://linear.app/opral/issue/MESDK-108/requirements-for-lint-rule-scheduling. In the morning of 29.5. |
Previously we executed message updates in batches (500 updates per batch) and waited for the next tick to mitigate the mass production of cached triggeres in ReactiveMap.
We mitigate the problem of trigger production by batching all changes to the reactive map and reduce signal production to one per loadMessagesViaPlugin call instead.
This means getAll() and get() signals are produced once per message load instead of per message changed when messages loaded from a plugin.
Example results of load-test executed with
pnpm run load-test 10000 1 1 1
closes opral/inlang-message-sdk#72