'What does Reusable in ReusableComposeNode mean in Jetpack Compose?

In Jetpack Compose, every Layout composable emits a ReusableComposeNode. But what does Reusable mean here? Below is the code of ReusableComposeNode.

@Composable inline fun <T : Any, reified E : Applier<*>> ReusableComposeNode(
    noinline factory: () -> T,
    update: @DisallowComposableCalls Updater<T>.() -> Unit
) {
    if (currentComposer.applier !is E) invalidApplier()
    currentComposer.startReusableNode()
    if (currentComposer.inserting) {
        currentComposer.createNode { factory() }
    } else {
        currentComposer.useNode()
    }
    currentComposer.disableReusing()
    Updater<T>(currentComposer).update()
    currentComposer.enableReusing()
    currentComposer.endNode()
}

I noticed with this code that the only difference between ReusableComposeNode and ComposeNode is the way the groups are created. The KDoc of startReusableNode(), which is the group creation method used in ReusableComposeNode, is written as follows.

Start a group that tracks a the code that will create or update a node that is generated as part of the tree implied by the composition. A reusable node can be reused in a reusable group even if the group key is changed.

I don't know what reused means here. Does this mean that the node is reused as measured? (normal nodes will start with the measure phase. but does the reused node skip the measured phase?)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source