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

Conversation

@mdebbar
Copy link
Contributor

@mdebbar mdebbar commented Mar 30, 2023

There are a few changes in this PR:

  1. Implement an LRU cache for text segmentation results to improve layout operations on repetitive paragraphs (thanks @yjbanov for the initial implementation of the cache).
  2. Invoke ParagraphBuilder.RequiresClientICU() only once and cache the result.
  3. Remove the image codecs check from browserSupportsCanvaskitChromium.

@mdebbar mdebbar requested a review from yjbanov March 30, 2023 14:38
@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Mar 30, 2023
Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm

import '../util.dart';
import 'canvaskit_api.dart';

typedef SegmentationResult = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Using those new features!

@kevmoo
Copy link
Contributor

kevmoo commented Mar 30, 2023

@mdebbar – do we have numbers for this? Memory increase? Speed improvements?

@mdebbar
Copy link
Contributor Author

mdebbar commented Mar 30, 2023

I'm not sure how to run all the combinations that the team has been tracking. @yjbanov wanna give this a shot?

One thing I know is this PR doesn't affect text layout benchmarks because this PR improves paragraph building, but has no effect on paragraph layout. The PR should still affect other app-like benchmarks (e.g. color grid).

Also, this PR will only affect the Chromium build of CanvasKit.

@mdebbar mdebbar added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 30, 2023
@auto-submit auto-submit bot merged commit 593bb2c into flutter:main Mar 30, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 30, 2023
@mdebbar mdebbar deleted the intl-cache branch June 22, 2023 21:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants