⬆️ ⬇️

Solving the wrong problem

From time to time I enter into discussions about what I wrote to find out what are the general moods and have I made some terrible mistake that no one just told me. The most unexpected comments that I met related to how quickly this site loads, because for most pages you need only two requests — one for the HTML file and one for the CSS — a total of less than ten kilobytes, and that is impressive.



This speed is partly due to luck. I use virtual hosting and cannot control the operation of other sites on the same server.



But I have a clear idea of ​​how people interact with a blog: they read it. All but me doing the same thing with the prog21 website - they open the pages and read them. There is no magic in distributing simple static pages. What is surprising is that most blogging engine developers solve the wrong problems.

')

Relational database that stores posts that can be displayed on the fly using templates with support for themes? This solves the problems of people who support the blog, and not the readers, and because of this, all readers have to put up with the slow loading of pages. And even if readers can not load the page, if the site is under heavy load.



(A while ago, the Eratosthenen sieve — an algorithm for finding all primes less than a given number — was a popular way to check the speed of programming languages. This algorithm is well suited as an example of a purely computational problem, but let's say you need a list of all primes less than 8000 , for an application that is critical to performance. Do you really calculate them while the program is running? You already know them . You calculate them once during development - and you're done.)



Cookies for statistics and Google Analytics scripts? This solves the problem of the site owner: “How can I find out exactly how many visitors I have?” And readers don't care.



Widgets for Google+, Twitter and Facebook? They do not solve any problems at all. You can easily tweet it anyway. On aggregator sites, in Google Reader and even in Google search output, there is already a button similar to “like”, so why duplicate the functionality? More importantly, a very small number of users generally use these buttons, but scripts and images slow down the loading of all pages.

Source: https://habr.com/ru/post/143454/



All Articles