Skip to content
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

ui.window.locale should be set on startup #1865

Open
Hixie opened this issue Feb 13, 2016 · 3 comments
Open

ui.window.locale should be set on startup #1865

Hixie opened this issue Feb 13, 2016 · 3 comments
Labels
a: internationalization Supporting other languages or locales. (aka i18n) a: tests "flutter test", flutter_test, or one of our tests c: performance Relates to speed or footprint issues (see "perf:" labels) d: examples Sample code and demos engine flutter/engine repository. See also e: labels. f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. P2 Important issues not at the top of the work list team-design Owned by Design Languages team triaged-design Triaged by Design Languages team

Comments

@Hixie
Copy link
Contributor

Hixie commented Feb 13, 2016

Currently, it's not, which means we waste 16ms in every app with a MaterialApp because we spin an entire frame waiting for the locale to be set.

This requires some redundant pumps in tests, too.

@Hixie Hixie added a: tests "flutter test", flutter_test, or one of our tests customer: demos framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. c: performance Relates to speed or footprint issues (see "perf:" labels) labels Feb 13, 2016
@Hixie Hixie added this to the Flutter 1.0 milestone Feb 13, 2016
@Hixie Hixie added the engine flutter/engine repository. See also e: labels. label Feb 14, 2016
@abarth abarth modified the milestones: 5: Make Hixie proud, 4: Make shippers happy Jan 27, 2017
@Hixie Hixie added the a: internationalization Supporting other languages or locales. (aka i18n) label Aug 8, 2017
@Hixie Hixie modified the milestones: 3: Current Milestone, 4: Next milestone Aug 8, 2017
@HansMuller
Copy link
Contributor

The current version of this problem, once #11497 lands, is that if we have to wait for an app's async localizations to load, then we're going to at least miss the "first" frame. More than one frame if localizations loading actually takes longer than 16ms.

Apps could create initial screens with more than one Localizations widget. That means that we a way for more than one async loader to defer the "first frame".

Maybe WidgetsApp should create a DeferFirstFrame inherited widget. Localizations widgets would use DeferFirstFrame.push() when an async load started and DeferFirstFrame.pop() when the load finished.

@Hixie
Copy link
Contributor Author

Hixie commented Aug 9, 2017

I wouldn't use a widget for this. Just something like binding.lockInput().

@Hixie Hixie modified the milestones: 3: Current Milestone, 4: Next milestone Dec 2, 2017
@Hixie Hixie added d: examples Sample code and demos and removed team: demos labels Apr 23, 2018
@zoechi
Copy link
Contributor

zoechi commented Jan 18, 2019

@GaryQian there were some changes that might be related (flutter/engine#6936, #24481).
Do you think this is still an issue?

@kf6gpe kf6gpe added the P2 Important issues not at the top of the work list label May 29, 2020
@kf6gpe kf6gpe removed this from the Goals milestone Jun 2, 2020
@Hixie Hixie removed this from the Goals milestone Jun 2, 2020
TahaTesser pushed a commit to NevercodeHQ/flutter that referenced this issue Aug 13, 2020
This also fetches master that will populate `FETCH_HEAD`

See flutter/plugins#1864
@Hixie Hixie removed this from the None. milestone Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: internationalization Supporting other languages or locales. (aka i18n) a: tests "flutter test", flutter_test, or one of our tests c: performance Relates to speed or footprint issues (see "perf:" labels) d: examples Sample code and demos engine flutter/engine repository. See also e: labels. f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. P2 Important issues not at the top of the work list team-design Owned by Design Languages team triaged-design Triaged by Design Languages team
Projects
None yet
Development

No branches or pull requests

6 participants