Let’s say you are building a new web app. When should you start to
I personally think that starting to make sure something is as fast as
possible is the last thing you should do. Because there are a number of
things you should think about and test out before you start on that.
First, you need to make sure that what you made are doing what you want
it do to.
Second, make sure that what you made are needed and add value to your
Third, make sure all the user experience is how you want it to be, so
that your target users will actually use it.
Then I would start to make sure everything is as fast as possible. This
means everything from how fast your code is to how large the code the
browser have to load is. My approach to optimising have always been to
find the way to do something that requires the least work. For example
by limiting how often you commit queries to the database(saving data),
using the fastest possible queries to fetch data and, if you are looping
over data: always continue to the next row as fast as possible when
there is no point in running a lot of extra code.
If you’re still not happy with the performance I would start to debug
and identify the parts of your code that is slow and try to find better
ways to do that.
In the backend it’s often about optimising how you deal with the
database and to cache slow stuff in memory (redid) and on the front end
is it often about using many smaller methods instead of large ones and
to limit how often stuff are re-rendered.