# Improving Codename One UI Rendering Performance with Revalidation Controls

DevFeed: [Improving Codename One UI Rendering Performance with Revalidation Controls](<https://devfeed.tech/articles/smarter-faster-rendering-19521.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/smarter-faster-rendering/>)

Author: Steve Hannah

Published: 2020-10-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [ui](<https://devfeed.tech/topics/ui.md>), [App](<https://devfeed.tech/topics/app.md>), [Code](<https://devfeed.tech/topics/code.md>), [container](<https://devfeed.tech/topics/container.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [component](<https://devfeed.tech/tags/component.md>), [display](<https://devfeed.tech/tags/display.md>), [layout](<https://devfeed.tech/tags/layout.md>), [performance](<https://devfeed.tech/tags/performance.md>), [ui](<https://devfeed.tech/tags/ui.md>)

## AI overview

This Codename One tutorial explains UI rendering's layout and painting phases and discusses how unintended revalidations can reduce rendering performance. It describes using revalidateLater() and a display property to reduce redundant revalidation work.

## Source excerpt

We've recently added some new display settings, and a new method, revalidateLater(), which can significantly increase your app's rendering throughput in some cases. Before I get to the specifics of these changes, let's review how UI rendering works in Codename One. The Codename One UI rendering can be broken down into two phases: Layout - Calculating the bounds for each component on the screen, and "laying" them out. Painting - Actually drawing each component. Generally you only want to run the "layout" step when the layout has changed. This would include when components are added or removed from a Container, or when a component's bounds or position has changed.