text stringlengths 1 372 |
|---|
by passing --enable-impeller to flutter run: |
or, you can add the following setting to your project’s |
AndroidManifest.xml file under the <application> tag: |
<topic_end> |
<topic_start> |
bugs and issues |
for the full list of impeller’s known bugs |
and missing features, |
the most up-to-date information is on the |
impeller project board on GitHub. |
the team continues to improve impeller support. |
if you encounter performance or fidelity issues |
with impeller on any platform, |
file an issue in the GitHub tracker. |
prefix the issue title with [impeller] and |
include a small reproducible test case. |
please include the following information when |
submitting an issue for impeller: |
<topic_end> |
<topic_start> |
architecture |
to learn more details about impeller’s design and architecture, |
check out the README.md file in the source tree. |
<topic_end> |
<topic_start> |
additional information |
<topic_end> |
<topic_start> |
performance best practices |
info note |
to learn how to use the performance view |
(part of flutter DevTools) |
for debugging performance issues, |
see using the performance view. |
generally, flutter applications are performant by default, |
so you only need to avoid common pitfalls to get excellent |
performance. these best practice recommendations will help you |
write the most performant flutter app possible. |
info note |
if you are writing web apps in flutter, you might be interested |
in a series of articles, written by the flutter material team, |
after they modified the flutter gallery app to make it more |
performant on the web: |
how do you design a flutter app to most efficiently |
render your scenes? in particular, how do you ensure |
that the painting code generated by the |
framework is as efficient as possible? |
some rendering and layout operations are known |
to be slow, but can’t always be avoided. |
they should be used thoughtfully, |
following the guidance below. |
<topic_end> |
<topic_start> |
minimize expensive operations |
some operations are more expensive than others, |
meaning that they consume more resources. |
obviously, you want to only use these operations |
when necessary. how you design and implement your |
app’s UI can have a big impact on how efficiently it runs. |
<topic_end> |
<topic_start> |
control build() cost |
here are some things to keep in mind when designing your UI: |
for more information, check out: |
<topic_end> |
<topic_start> |
use saveLayer() thoughtfully |
some flutter code uses saveLayer(), an expensive operation, |
to implement various visual effects in the UI. |
even if your code doesn’t explicitly call saveLayer(), |
other widgets or packages that you use might call it behind the scenes. |
perhaps your app is calling saveLayer() more than necessary; |
excessive calls to saveLayer() can cause jank. |
<topic_end> |
<topic_start> |
why is saveLayer expensive? |
calling saveLayer() allocates an offscreen buffer |
and drawing content into the offscreen buffer might |
trigger a render target switch. |
the GPU wants to run like a firehose, |
and a render target switch forces the GPU |
to redirect that stream temporarily and then |
direct it back again. on mobile GPUs this is |
particularly disruptive to rendering throughput. |
<topic_end> |
<topic_start> |
when is saveLayer required? |
at runtime, if you need to dynamically display various shapes |
coming from a server (for example), each with some transparency, |
that might (or might not) overlap, |
then you pretty much have to use saveLayer(). |
<topic_end> |
<topic_start> |
debugging calls to saveLayer |
how can you tell how often your app calls saveLayer(), |
either directly or indirectly? |
the saveLayer() method triggers |
an event on the DevTools timeline; learn when |
your scene uses saveLayer by checking the |
PerformanceOverlayLayer.checkerboardOffscreenLayers |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.