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

feature: PausableComposition feature flag in CCGP #4546

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/labels.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE labels SYSTEM "https://resources.jetbrains.com/writerside/1.0/labels-list.dtd">
<labels xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/labels.xsd">

<primary-label id="experimental-general" name="Experimental" short-name="Experimental" href="components-stability.html#stability-levels-explained" color="red">The feature is Experimental. It may be dropped or changed at any time. Use it only for evaluation purposes.</primary-label>
<primary-label id="experimental-opt-in" name="Experimental" short-name="Experimental" href="components-stability.html#stability-levels-explained" color="red" >The feature is Experimental. It may be dropped or changed at any time. Opt-in is required (see the details below), and you should use it only for evaluation purposes.</primary-label>
<primary-label id="alpha" name="Alpha" short-name="α" href="components-stability.html#stability-levels-explained" color="strawberry">The feature is in Alpha. It may change incompatibly and require manual migration in the future.</primary-label>
<primary-label id="beta" name="Beta" short-name="β" href="components-stability.html#stability-levels-explained" color="tangerine">The feature is in Beta. It is almost stable, but migration steps may be required in the future. We'll do our best to minimize any changes you have to make.</primary-label>

<secondary-label id="eap" name="EAP">This functionality is available only in the latest EAP version.</secondary-label>
</labels>
21 changes: 19 additions & 2 deletions docs/topics/compose-compiler-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ This results in fewer slots being used and fewer comparisons being made at runti

### OptimizeNonSkippingGroups

<primary-label ref="experimental-general"/>

**Default**: disabled

If enabled, remove groups around non-skipping composable functions.
Expand All @@ -190,9 +192,24 @@ unnecessary groups around composables which do not skip (and thus do not require
This optimization will remove the groups, for example, around functions explicitly marked as `@NonSkippableComposable`
and functions that are implicitly not skippable (inline functions and functions that return a non-`Unit` value such as `remember`).

> This feature is considered [Experimental](components-stability.md#stability-levels-explained) and is disabled by default.
### PausableComposition

<primary-label ref="experimental-general"/>

> The feature flag affects behavior only with a version of Compose runtime that supports pausable composition,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not combine the info and warning into one warning at the top? If the warning is at the bottom of the text then readers can miss it if they don't read through all the content. Or think the warning is applicable to the next section. WDYT? :)

> starting with `androidx.compose.runtime` 1.8.0-alpha02.
> Older versions ignore the feature flag.
>
{style="warning"}
{style="note"}

**Default**: disabled

If enabled, changes the code generation of composable functions to allow pausing when part of a pausable composition.
This lets Compose runtime suspend composition at skipping points,
splitting long-running compositions across multiple frames.

Lazy lists and other performance intensive components use pausable composition to prefetch content
that might cause visual jank when executed in a blocking manner.

### StrongSkipping

Expand Down
Loading