-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat(cat-voices): implement web worker for compression logic #1020
Conversation
✅ Test Report | |
@minikin @dtscalac This change affacts several packages inside Edit: the fixed path problem is indentified by loading from its relative path. |
...lyst_voices_packages/catalyst_cardano_serialization/lib/src/rbac/x509_metadata_envelope.dart
Outdated
Show resolved
Hide resolved
Co-authored-by: Dominik Toton <[email protected]>
@minikin Objectively speaking this PR reduces the lag however it still happens. I've debugged the issue and the biggest offender once the compression was optimized is the Ed25519 signing which takes about 180ms per signing, we do it twice per registration. @apskhem can you please report another task for this? Here's the part of code that is slow: |
...lyst_voices_packages/catalyst_cardano_serialization/lib/src/rbac/x509_metadata_envelope.dart
Outdated
Show resolved
Hide resolved
Co-authored-by: Dominik Toton <[email protected]>
...alyst_compression/catalyst_compression_web/lib/src/interop/catalyst_compression_interop.dart
Outdated
Show resolved
Hide resolved
...ces_packages/catalyst_compression/catalyst_compression_web/assets/js/catalyst_compression.js
Outdated
Show resolved
Hide resolved
...ces_packages/catalyst_compression/catalyst_compression_web/assets/js/catalyst_compression.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Dominik Toton <[email protected]>
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
Description
Moved the compression functions in JS side to run in web workers to prevent blocking (freezing) on the main thread that might impact on user experiece during using the app.
Related Issue(s)
Closes #1014
Description of Changes
Breaking Changes
TD;LR: Compression functions in JS return
Promise<string>
instead ofstring
.The compression functions in JS was changed to run in web workers. Hence, all the functions return
Promise<string
instead of the old version of returning solelystring
. The interop functions in the Dart side (catalyst_compression_web
) also need to change accordingly to support those JS functions. So the packages or functions that rely on this compression package need to convert themselves to run asynchronously.Please confirm the following checks