Over a million developers have joined DZone.

Easy to add but hard to remove

· Performance Zone

See Gartner’s latest research on the application performance monitoring landscape and how APM suites are becoming more and more critical to the business, brought to you in partnership with AppDynamics.

In rapid development projects, how easy and interesting it is to add new functionality is key.  In this environment, exciting, new, terser languages are more productive. It helps to keep developers motivated and happier which leads to more code.

In low latency environment, adding code is not the hard problem.  Understanding the problem, the behaviour of the system, and what you program is really doing is the hard program. This leads to removing code, layers and complexity are more important and harder to achieve. To remove something you gain from static analysis, a minimum of side effects and clear relationships.  You also benefit from a clear understanding of what the code is really doing all the way down to the CPU level.  Without this you cannot remove things which don't need to be done and your code will be needlessly slower.

A simple example is the amount of garbage you are producing. One way to slow down a program is to produce lots of garbage.  This not only cause GC pauses, which is what most developers are aware of, but also fills your CPU caches with garbage slowing down all your code (or any code which performances a memory access) by a factor of 2-5x in real applications.  When you consider how much effort goes into speeding up a program by 2-5x by using multiple threads, this is not a trivial slow down. In the low latency space, it is not unusual to see processes which are made faster single threaded by using less garbage than they would be if they used every CPU.

In short, it is not how easy it is to add something, but how hard it is to remove something the computer doesn't need to be doing which matters.

Java has really grow up in this area since Java 5.0. It has been since then that you see more Java in the fast work load space. i.e. low latency and high throughput. Over time, Java will be used more and more in this space.

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
Antoine de Saint-Exupery
French writer (1900 - 1944)

The Performance Zone is brought to you in partnership with AppDynamics.  See Gartner’s latest research on the application performance monitoring landscape and how APM suites are becoming more and more critical to the business.


Published at DZone with permission of Peter Lawrey, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}