Premature optimizer question: ```@Composable priv...
# compose
u
Premature optimizer question:
Copy code
@Composable
private fun VerticalSpacer(size: Dp) {
    Spacer(modifier = Modifier.height(size))
}
Does creating helpers like this add some overhead?
l
Not much. If you really care about it, annotate this Composable with
NonRestartableComposable
. See its doc for explanation.
u
how about making it
inline
?
s
Simply making this inline sounds like exactly what you want, since it’d act as close as possible to how it’d be if you never introduced this function. Don’t think more than that tbh, unless you profile this and somehow see that it’s a problem, which I highly doubt