# Fail Fast & Margin/Padding Performance

DevFeed: [Fail Fast & Margin/Padding Performance](<https://devfeed.tech/articles/fail-fast-margin-padding-performance-19298.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/fail-fast-margin-padding-performance/>)

Author: Shai Almog

Published: 2016-11-22T00:00:00Z

Content type: article

Language: en

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

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [developers](<https://devfeed.tech/tags/developers.md>), [performance](<https://devfeed.tech/tags/performance.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [update](<https://devfeed.tech/tags/update.md>)

## AI overview

The article describes changes in Codename One that make refactoring errors in a project's main class fail earlier in the simulator. It also explains optimizations to margin and padding access methods to reduce overhead in performance-critical rendering paths, while noting that most users may not notice a difference.

## Source excerpt

One of the frustrating parts in Codename One is builds failing in the cloud, the expectation is that a build that passes locally would pass in the cloud and that is something we strive to have at all times. One of the more common failures for new developers is due to refactoring of the main class or changing the signatures of the methods e.g. adding a throws clause to start().