Table of Contents
Maintaining website performance is like working with a quadruped beast.
If just one leg fails, your site goes down.
When Is It Time to Think About Performance?
I usually think about performance when I access a site that has a heavy page, but heavy is not a good measure since it leads to the doubt “how much heavy”.
I usually make the test performance with pages having sizes of around 5 MB.
If it loads slowly enough to make you avoid using it, it is time to consider thinking about performance.
Although time is a subjective measure, comparing by the average navigation time, it is good enough for me.
Fixing a loading time may be an alternative for the sake of better precision. On the web, you may get many opinions.
How do I measure a page size?
A simple method is to download the page using the browser’s “Save as..” option.
After the download, you check the size of the file of files downloaded.
The 4-factors Performance Issues (at least)
Most of the time, when judging a site performance we first think about connection speed and techs behind it.
This approach leads to severe mistakes.
We must go, at least, through all the 4-factors performance issues:
- Technology usage – the way things are done.
Language: Java, JavaScript, Ruby, etc. and their frameworks.
Database: Oracle, MongoDB, etc. ; concurrency, locks; etc.
Project architecture — the way things are done, for instance too many layers, heavy objects running everywhere, memory consumption, memory swap, etc.
Software update — Do you have the last versions?
. - Connection speed, throughput, concurrency, protocol, etc.
. - Data traffic generation — The way the content is handled.
Things like images’ size and format, pagination, data size downloaded for each hit, synchronicity/asynchronicity, cache, etc.
. - Client’s and Servers’ Hardware.
How much memory do have a client and the server on the two sides of the connection?
Their CPU architecture like speed, cache channels, parallelism, bus, etc.
An easy way to check all this is making the following question:
How old is the hardware?
This question is usually ignored.
Checking Performance
This is a huge subject.
We may write many books about this.
My fast approach for “real life” follows the list below, following the order.
First I need to care about the techs to be used and how the project is constructed.
Satisfied this, the next step (2) is to check how things work when running.
The 3rd step considers the heaviest requests that are possible for the application.
Well, if you’ve got low performance on 2nd step, this step has no sense at all.
The 4th step is one that is most of the time forgotten or ignored.
We are used to working on our machines but the time goes on, making things older and less powerful.
Consider that the browser nowadays has too much more processing since the web specifications increased tremendously.
Client processing is much more intense than before when first came the idea to move part of the task to the clients.
Old clients are slow.
Before fricking out, consider how old is the hardware used to test, and please perform a test using up to date hardware.
Perform the test suggested at the beginning of this post accessing heavy pages (size about 5 MB).
Consider the following requirements for the time I’ve published this post at Ago, 2020:
- CPU
Minimum i7 8th generation. - Memory
Minimum 16 GB (check their speed) - Mass storage
Minimum: SSD for running O.S. processes and possibly mechanical HDs for the rest.
Think that new techs require new hardware.
It doesn’t make sense to project a new technology restraining it by the old requirements, does it?
It may keep compatibility but it may not lose power because of the new works with the most present and the future.
Old i5 and i7 machines, 8 GB RAM memory vs. mechanical HDs, are now too slow for a “fast approach”.
You’ll be amazed at how heavy sites become wonderful ones when using recent hardware, just because we forget that the time doesn’t stop requiring hardware update.
New features are constantly added making much more but requiring much, much more.
“With great power comes great responsibility”
Well, we also may think as:
“With great power comes great demand”
Brazilian system analyst graduated by UNESA (University Estácio de Sá – Rio de Janeiro). Geek by heart.