Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented May 6, 2021

issue: flutter/flutter#81559
depends on: #25867

locally tested
before:

flutter: BasicMessageChannel/StandardMessageCodec/Flutter->Host/Small: 153.3 µs
BasicMessageChannel/StandardMessageCodec/Flutter->Host/Large: 1246.7 µs
BasicMessageChannel/BinaryCodec/Flutter->Host/Large: 143.2 µs
BasicMessageChannel/BinaryCodec/Flutter->Host/1MB: 1218.6 µs

after:

flutter: BasicMessageChannel/StandardMessageCodec/Flutter->Host/Small: 152.7 µs
BasicMessageChannel/StandardMessageCodec/Flutter->Host/Large: 1192.5 µs
BasicMessageChannel/BinaryCodec/Flutter->Host/Large: 150.2 µs
BasicMessageChannel/BinaryCodec/Flutter->Host/1MB: 761.2 µs

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.
  • The reviewer has submitted any presubmit flakes in this PR using the engine presubmit flakes form before re-triggering the failure.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@gaaclarke gaaclarke force-pushed the objc-eliminate-copies branch from dc64c1f to 5703bfc Compare May 13, 2021 18:10
@gaaclarke gaaclarke marked this pull request as ready for review May 13, 2021 18:11
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@gaaclarke gaaclarke requested a review from chinmaygarde May 13, 2021 18:12
@gaaclarke
Copy link
Member Author

@chinmaygarde This is the last PR in my series of PR's to speed up platform channels iOS by eliminating copies. It was all building up to this moment.

Copy link
Member

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the delay. This looks great. Thanks.

@gaaclarke gaaclarke added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label May 14, 2021
@fluttergithubbot fluttergithubbot merged commit 1abeeec into flutter:master May 14, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 15, 2021
@gaaclarke
Copy link
Member Author

gaaclarke commented May 15, 2021

This finally landed and has official results from our tests. It reduced the cost of sending 1mb over binary platform channels 48% on iOS: https://flutter-flutter-perf.skia.org/e/?begin=1620764044&end=1621044607&queries=sub_result%3Dplatform_channel_basic_binary_2host_1MB%26test%3Dmac_ios_platform_channels_benchmarks_ios&requestType=0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes embedder Related to the embedder API platform-android platform-fuchsia platform-ios platform-macos waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants