Software application performance optimization is often an overlooked stage in the development lifecycle. It’s not particularly exciting, after all. It’s way more fun to buy a new car than it is to pay for the oil change!

But like regular tune-ups at the mechanic, performance optimization is absolutely essential to making sure that you protect your application investment and keep it running efficiently for years to come. It’s so important, in fact, that it’s been given several names: application optimization, software optimization, code optimization, and application performance management (APM).

What is application optimization?

Application optimization is the set of best practices and standards that developers use to keep a software application running optimally. Maintaining speed is definitely an important part of application performance, but so is doing it efficiently: consuming fewer resources and avoiding costly technical debt.

Optimization is a company’s strongest weapon against poor software performance and unwanted deprecation. Problematic software can have any number of causes. Poorly written code is the most obvious, but it’s also possible that the code is just outdated and can’t keep up with tech advancements.  Or it could be that code that worked in a test environment or with a small volume of users can’t handle a heavier load.

Image of laptop that is being updated demonstrating percentage complete of update

Regardless of the cause, optimizing your application performance is a wise investment that could impact your business on a number of levels.

Why Application Performance Matters

Imagine a business call center where customers phone in to get support. How many times have you heard the service representative on the other line typing feverishly at their keyboard, apologizing for the system being slow, and experiencing delays in retrieving important information they need to answer your question or concern?

Across nearly every industry, companies and the people they employ in task-oriented roles live in mission-critical applications. That software is nearly always open, and it’s where essential business processes occur. If an application of that level of importance is performing inefficiently, it begins to impact users. They might have a hard time staying in the flow of the task. They might lose the opportunity to use information in time-sensitive scenarios like the customer support example above.

In customer-facing applications, poor performance can lead to even bigger issues. Instead of helping your customers do business with your company and creating a competitive advantage, the software leaves them frustrated and aggravated.  They might attempt reloading the page, which cause even more problems and delays for the application. 

Application performance can directly impact company metrics like employee performance and productivity. That impact can easily extend to key operational objectives across departments, such as customer satisfaction and revenue. It can also lead to customer defections. And add to that the direct costs of creating expensive workarounds for an application that crashes all the time or risking every business process grinding to a halt to fix a critical error.

It becomes more and more apparent that performance isn’t an option for businesses that rely on custom applications; it’s a necessity.

Focusing on improving performance can benefit your company across all of these metrics. But what are some of the ways you can measure and evaluate software performance to figure out where to prioritize your efforts?

How to Measure Software Performance

When we talk about performance in application development, we’re most often talking about speed. Faster loading pages provide a better user experience.  In fact, it so important that Google factors load speed into its ranking algorithm. It’s reasonable to loosen standards somewhat for complex internal enterprise applications that rely on back-end database queries, for example, but speed still matters.

Even as systems have grown more powerful and the internet has grown much faster, standard guidelines for computer response times haven’t changed for nearly half a decade:

  • 0.1 second is about the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary except to display the result.
  • 1.0 second is about the limit for the user’s flow of thought to stay uninterrupted, even though the user will notice the delay. Normally, no special feedback is necessary during delays of more than 0.1 but less than 1.0 second, but the user does lose the feeling of operating directly on the data.
  • 10 seconds is about the limit for keeping the user’s attention focused on the dialogue. For longer delays, users will want to perform other tasks while waiting for the computer to finish, so they should be given feedback indicating when the computer expects to be done.

While much more happens “instantaneously” now compared to 50 years ago, the way that human brains process visual cues and sense delays hasn’t changed. So one of the ways by which we measure and evaluate software performance is by perceived time: how fast does an application feel to users? (More on this later.)

In addition to the speed of the application itself, usability is another factor that can significantly impact efficiency. The more usable the software, the quicker and more effective the user can be while they’re in it. Measuring usability might involve counting the number of steps or the time a process takes before and after optimization. Can optimization reduce the number of steps? Can it make completing a task more intuitive? Is information contextually relevant and easy to find?

Web Application Performance Monitoring Tools

As with cars, “set it and forget it” doesn’t work when it comes to mission-critical applications. Just because an application works in this moment, it’s not guaranteed to run optimally for years or even months into the future. Even the most optimized platform will accrue technical debt from regular use and from the maintenance required to keep it updated and secure.

One best practice for software optimization is putting systems in place to help identify and troubleshoot potential problems. Application performance monitoring tools like Azure Monitor can reduce the burden on development teams and DevOps engineers by providing real-time, proactive monitoring for common problems like server overload and downtime. These tools can alert teams when thresholds have been crossed, giving them time to troubleshoot and respond before the situation becomes critical.

Other tools like Seq offer error logging to allow teams to dig deeper into specific user interactions to find out where problems might be occurring. This can be especially important for mission-critical software where a deeper level of transparency and insight is needed.

In addition to proactive monitoring tools that can spot potential problems ahead of time, it’s important for teams to adopt the best practice of doing periodic reviews of their systems. Devoting concerted time to paying down technical debt can prevent hotspots while they’re still “warm.” It’s not uncommon that doing routine maintenance and proactively addressing issues will translate into less work and lower cost in the long haul. For example, optimization could involve refactoring certain pieces of code without involving an entire rewrite.  

The bottom line? Monitoring tools are only useful if you commit to systematically remedying the issues that they turn up.

How to Optimize the Performance of a Web Application

While every application is different, there are some additional best practices you can likely adopt to improve software performance:

1. Take the time to research the scope of your problem.

It’s not uncommon for prospective clients to visit us thinking they need an entirely new application when they really only need a few tweaks—and vice versa.

The user experience end of an application doesn’t always reveal what’s going on under the hood. It could be that problems with the architecture and/or the database are causing the issues. It could be that the application needs an update to the backend code that queries and accesses that data. It could be a case of poorly written JavaScript and a browser rendering problem on the front end.

Working with a development partner and an interdisciplinary team of experts across multiple areas of development might seem like an expensive choice, but it can end up saving you money in the long run. A “jack of all trades” with only cursory knowledge of your entire tech stack could end up introducing more problems than they fix, and they are more likely to talk you into solutions that you don’t need. A team of experts, on the other hand, can help triage issues. They’ll be able to explain which optimizations are more likely to impact your business (and which ones can wait).

2. Adopt best practices and standards for code.

Today’s best web applications are fast, lightweight, and flexible. As much as possible, you’ll want to consider making optimizations and upgrades that “future-proof” your app moving forward. There’s no such thing as no technical debt, just as there’s no such thing as no auto maintenance. But with application modernization, app development can be structured so that future improvements are more modular—and changing a tire doesn’t mean taking apart the whole car.

3. Make good choices when it comes to hardware and infrastructure.

Deciding on the right infrastructure is important—you want to be able to accommodate surges or bursts in usage so that you can avoid lagging performance and crashes. But it’s false to assume that better hardware will always solve the problem and paying for infrastructure you’re not using is also an expensive gambit. Instead, find flexible solutions like elastic cloud infrastructure such as Azure elastic cloud or AWS elasticity services that make it easier to pay as you go but can anticipate and react quickly to unanticipated use.

4. Optimize your UX

User experience is one of the hottest fields in development and design, and for good reason. There are many ways that UX optimizations can impact perceived time through visual and psychological cues. Here are a few examples of some successful program optimization techniques:

Progress bars and percentages to indicate “progress.” While the heavy lifting of a given task might be done on the backend, these interface cues help set users’ expectations and make delays more manageable.

UX optimization showing visual cue of progress

Progressive page loads. Instead of waiting for entire pages to load before displaying, techniques like “lazy loading” load and display the top of a page first, and then follow that with the rest of a web page’s display. This gives users something to look at and to begin to consume while the page is still working; in most cases, by the time a user has scrolled down to the rest of the page, it’s ready for display.

Progressive images. Pages can load only rough thumbnails of images first to give viewers and indication of what they’re about, followed by higher resolution versions on the full load.

5. Build optimization into your budget and roadmap.

One of the biggest challenges we see in software optimization is a lack of follow-through, often because companies don’t anticipate the extent of the problems that technical debt and aging software will cause. No one knows how good their car insurance is until they need it.

With this in mind, the most important best practice you can adopt is the discipline to maintain your system. This means allocating funds for it in your budget and allocating time for it in your roadmap and schedule. Without this commitment, your optimization strategy will always be reactive—and so will your most important business operations.

Application Optimization at MercuryWorks

Ready to learn more about how you can improve your mission-critical business operations with software optimization? At MercuryWorks, we’ve spent more than 20 years helping companies solve wicked problems through top-quality software and service. Learn more about our application modernization services or reach out to us today.

For a long time, the concept of hosting an application was constricted to server racks inside the same building as the company developing the web application.  Scaling an application that is hosted in an internal environment has several challenges ranging from equipment costs, to physical space in a server room, to man hours to replicate everything needed for the application.  Azure has made this process very simple!  To start we should go over a few reasons why it would be necessary to scale your cloud-hosted application.    

Why Scale Your Application?

When you begin building an application, you may have grand plans for it to be adopted by thousands, if not millions, of users.  Realistically, applications typically start off with a modest user base and grow over time with rates of growth varying significantly by business.  As your application continues to grow, the original architecture put in place could start to produce a poor user experience.  A potential solution would be to scale the architecture hosting your application.  Below are a few reasons why scaling is a valuable tool when hosting your application in a cloud-based environment. 

Performance Improvements

Over time your application may experience performance issues.  This can be caused by high traffic volume, memory consumption, or taxing the CPU from complex logic.  When this happens the first reaction is often to throw more resources at the problem.  Azure offers the ability to Scale Up and Scale Out” on a wide variety of assets in their suite of products.   This will allow you a quick, simple way to add more performance to your application or split that high traffic volume with ease. 

Application Outage

Once you have your first production outage you start thinking of user experience and uptime.  This is a very good reason to have an application that can quickly and easily scale.  You want to make sure that your user base can access your application at any time.  Having multiple instances up and running allow for an issue to occur and your application still remain accessible. 

Global Access

Another good reason to scale your application would be your user base.  If you have users all around the world then you do not want to be stuck to a single region in Azure.   By limiting your application to a single region in Azure you are limiting yourself from providing the best user experience possible for a subset of your user base.  When your application needs access on a global scale it is essential to ensure your application is located across several different regions in Azure.  For example, MercuryWorks works with a client that has a global user base of physicians in need of ocular tissue for their patients and global access was a important factor when we established their infrastructure. 

When should you scale your application?

Now that the Why is out of the way, the next question should be When.  Depending on your philosophy for deployment, this question will come up in the beginning of your development lifecycle or potentially the first time you hit a major issue that needs immediate attention. 

At Mercury, we partner with clients to help them anticipate what their needs will be at the onset of development and over time.  We do this by modeling the client’s potential needs (if building from scratch) or reviewing the current performance metrics (if working on an existing application).  From there we make recommendations for the optimal MVP-based architecture, knowing that scaling is always an option as the application gains adoption.  A great solution for hosting web applications is Azure’s Platform as a Service (PaaS) architecture.  It provides a lower maintenance cost because you do not need a Network Admin running updates each week to make sure you are up to date.  It also provides a very quick scaling option should you decide your application is not performing up to your expectations. 

When it comes to Scaling Up or Out, this is a decision that needs to be made based on a number of factors.  If you are seeing very high traffic that is causing your application resources to spike, then Scaling Out is the right solution for you.  Scaling Out will take your application and clone it as many times as necessary, all while adding a load balancer to make sure traffic is spread out evenly.  If you have low traffic activity but seeing resources peak to 100% then Scaling Up is the solution.  Scaling Up allows you to quickly add more resources to your application to allow it to process normally under highly stressful executions. 

In my experience, both options are powerful tools in your arsenal and neither take very long to accomplish.  The act of configuring Azure for either is a few clicks and the processing time for Azure is a few minutes max. 

How to scale your application?

In this section we are going to walk through how easy it is to scale your application.  Azure readily has several assets that can quickly and easily scale with a few clicks of a mouse.  For this post we focus on Azure App Service and Azure SQL Database.  They both have the concept of “Scale Up”, but App Service has the added feature called “Scale Out”.  

Azure scaling representation

Scale Up

Scaling Up is the classic answer to a technology problem which is to throw more resources at the situation until it resolves itself.  All Azure assets have several different pricing tiers that can provide different levels of resources depending on your needs.  Below is a screenshot of what you will see when you are working to scale an Azure SQL Database: 

Azure standard scaling up

As you can see there are many options to choose from when making your decision.  Azure SQL Databases have 3 tiers of performance: Basic, Standard, and Premium.  Each tier can allow the database to have a maximum number of resources available.  To scale this type of resource you simply pick the category that fits your needs, adjust the slider to add/remove resources, and click Apply.  

Azure Scale

When it comes to Azure App Service the process is a more direct.  When you select the “Scale Up” option located in the navigation you will be taken to a slightly different screen layout.  You still have 3 tiers to choose from but this time you have set options to pick instead of sliders.  As you can see in the screen shot below, this blade also shows you the currently selected resource package.  To change your currently selected package, all you need to do is select a new version and click Apply. 

Azure Pricing Tiers

Scale Out

Scale out is a special option available to Azure App Service.  This feature allows you to create one, or multiple, clones of your existing application to better balance traffic or resource load.  Essentially it is like creating multiple App Service that all live behind a Load Balancer.  The scale out feature is available in two methods both of which will help you accomplish your goal of allowing your application to be more performant for your users. 

manual or autoscale options

Manual scale is just as it sounds.  You are given a simple slider that will tell Azure how many active instances of your application you want available.  Custom autoscale is where the magic really happens.  You can define a wide range of requirements for your application to be scaled out for you.  Azure has over 20 different options you can choose under “Metric Name” that will let you define upper limits for when your application should scale on its own! 

Conclusion

With the push to Cloud-based hosting, having a quick and easy method to scale your applications is very critical.  Azure provides the tools necessary to achieve this expectation with some of its most popular PaaS offerings.  The best course of action is to start early and have a plan in place.  Azure provides excellent automation tools and alerting that will allow to gauge when the time is right to scale your application and bring it to the next level.