Performance aspect of any application plays a critical role
for user experience. Slower applications frustrate the customers and customers
tend to look for faster application from different vendor. Its
good practice to write non-functional requirements also along with functional
requirements. If non-functional requirements are not written as product
requirements, it is likely that performance aspects are missed to implement
during design and implementation phases of the product/application development. It usually happens that application performance
tuning is carried once the customers using the application start expressing
their frustrations. The performance improvement activity is carried out as a separate
project itself. Not a good practice anyway. There are several ways to look into
products/applications to make it work faster.
Capture performance requirements
This is the first step. Customers inputs can be taken in
this regard based on their experience of using similar products in the past. The
truth is that the customers will be delighted to give inputs; the only thing is
they must be asked for it. I remember many customers had made a list of product
improvements but they had never expressed them, when we asked their bad
experiences with the product, we were surprised to see performance improvements
coming in. Specifically define performance numbers for each of the operations
of the product. For ex: File Upload shall be completed within 10 seconds, the
report shall be generated within 12 seconds. Deciding on these numbers is
tricky here. Few prototypes can be tried to see how fast an operation can be
carried out after applying all possible performance improvement guidelines.
Have Network Simulators
Each customer can have different network speed. Non functional requirements must be written
basing a network speed may be considering the worst case scenario. Now the requirements look better. Ex: File
Upload shall be completed within 10 seconds at 256KBPS etc. It is important that every developer in the
team uses the same network simulator for getting accurate performance data.
Design the non functional requirements
The poor performance of the product could be because of its
design. This is simply because there are
several methods to implement a given product operation. For example by using
different algorithms, program logic etc. A simple understandable example is to
avoid multiple reads and writes. Read/Writes are always costlier operations. It
could be file read/writes, database read/writes or a hardware device
read/writes. So reading once the required information and using the program
logic gives better performance over reading the information as and when
required. This may not be always true; varies from kind of the
product/application being developed. The person who has understood the
requirements and more importantly the technology involved can best write the
better software design.
Avoid unnecessary program Intelligence
Software has to do exactly what it is supposed to do. No
extra things. Developers usually tend to add certain intelligence in the
program that end customers never wanted. If you are considering performance
requirements as Critical To Quality (CTQs), then not even think of adding a
line of code that’s not required to meet the requirements. For example, if a customer registers
himself/herself using a registration web page, you just need to give a
confirmation text in the same page. It is not required to send an email and
mobile text message unless sending an email and text message to mobile is
written as end user requirements.
Measure & Improve
In a performance improving activity, most of the time
developers will be spending time measuring the time taken to complete an
action. Measurement has to happen following a defined system configuration and
defined speed. Some of the important parameters to consider are to note the CPU
usage, memory usage etc at the time of taking readings. And all the readings
are taken at defined parameters. This will help to get accurate data from
multiple systems and more importantly merge the data into a single document.
Conclusion
These are high level guidelines. Any performance tuning subject falls down to
writing faster code. There are several web resources to study how to write a
faster code. Involving experienced developers is also another thing towards
bringing a good performing product.
No comments:
Post a Comment