-
Notifications
You must be signed in to change notification settings - Fork 109
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
MessageLintReports get() and getAll() async, with no reactivity, to reduce excessive resource consumption #2378
Conversation
🦋 Changeset detectedLatest commit: b5fef9f The changes in this PR will be included in the next version bump. This PR includes changesets to release 26 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 |
🥷 Ninja i18n – 🎉 Translations have been successfully updated |
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.
I found a bug when loading the Fink with a lint rule filter selected:
https://www.loom.com/share/84bc0df455bf45f48435a6f2f6a38ac4
It is not something SDK-related and more about Finks application state, so let me know, if I should fix this.
inlang/source-code/editor/src/pages/@host/@owner/@repository/Message.tsx
Outdated
Show resolved
Hide resolved
Added @felixhaeberle to reveiw the sherlock fix. |
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 👍
@NiklasBuchfink I have pushed a fix for this |
partial fix for #2327 (memory consumption still limits scale)
resolves #2073
https://www.loom.com/share/3cf3c51d2f644886948c1267fa73f176
remove reactive map and make lint reports api async
MessageLintReportsQueryApi is simplified to make it non-reactive (no subscriptions), and the lint-report-specific ReactiveMap is replaced with a vanilla Map. (This change replaces the additional includedMessageIds api from the first experiment.)
Reasoning 💡
Lint reports don't require their own separate reactive map over all messages. It should be possible to maintain an up-to-date model of lint reports in memory, and build reactive (auto-updating) UIs with lint reports, both using only the messages reactive interface to watch for changes.
This would the first step toward removing granular (per message) reactivity from the sdk core.
status:
limit = ~10000 messages with translation into 36 languages
first experiment - new api
IncludedMessageIds
(abandoned)First attempt to fix the issue replaced subscription to
getAll()
with a subscription toincludedMessageIds
. This new api returns just the message IDs which have lint reports, instead of returning all lint reports in every event, making it much lighter. The change was implemented in d7ae5c1 but does not fully resolve the issue.https://www.loom.com/share/358ae27b6dda403aa4c013a2ac0b723b
The loom show the out of memory failure when translating 4500 messages with
project.query.messageLintReports.includedMessageIds.subscribe
in the load test.