-
Notifications
You must be signed in to change notification settings - Fork 354
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
Improve sass --embedded
performance
#2013
Conversation
sass --embedded
performance
I would like to avoid using FFI for this until there's a Dart-Team-owned package available for it. I don't feel confident in my ability to own and maintain that code. |
@mraleph I took your Mailbox implementation and made it work with the current dart-sass. However, we would like to see if Dart Team can own the FFI part and ship it as a package that we can consume. Would you or someone from Dart SDK team be able to help us? Thanks in advance! Reference: dart-lang/sdk#52121 |
@ntkme yes, we are going to provide the package as agreed. I was planning to take a look at this in the next month. |
@nex3 I will split this up into smaller PRs. |
9cff4ca
to
6c59213
Compare
@ntkme we have published https://pub.dev/packages/native_synchronization |
@nex3 Welcome back. This PR is now ready for review. |
Thanks for the ping. It may be a few days before I can get around to this, but it's on my radar. |
This encapsulates the logic of repurposing an existing isolate connection to minimize mutability. Instead, messages from the isolate are exposed as a separate Stream for each compilation.
…AsyncError to top level" This reverts commit 43fc8e5.
@nex3 Huge thanks for refactoring the reuse logic and remove some left-overs. I've reverted the commit of bubbling up ProtocolError back to original implementation and updated documentation accordingly. |
Thanks! |
This PR improves the performance by doing the following changes.
The wire packets of Record type(int, Uint8List)
are decoded as streaming.The communication between main isolate uses Record type(bool, Uint8List)
, therefore allow a boolean signal to be passed to deactivate the channel at the correct timing, to fix the race condition.Performance summary: