Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's exactly what I was thinking about. For example, last weekend I was looking at the products offered by an online bike shop. There were at most a few thousand pages showing product lists with prices. Some of these pages took more than a second (!) to load. What the hell is going on? What's the server doing all that time? That should be instantaneous. It can be solved by a small folder of static html pages, re-generated when stock changes a few times per week.

I'm not a web developer so maybe what I say does not make sense and sounds stupid. But I'm just astonished by what process this happens to be a complicated problem.



Based on the numerous e-commerce web sites I see on a daily basis, it's usually one or more of the following:

* Inefficient, disabled, or non-existing caching.

* Random SEO plug-ins/add-ons doing things like queries on non-indexed data or insanely convoluted JOINs.

* Logging every single HTTP request into a single table that nobody ever remembers to truncate.

* Multiple queries for each page in order to recommend similar products in the page footer or on some widget.

* Checking whether the visitor is logged in, and if there's anything in the basket yet.

* Checking whether there's an active discount for the current user/product combination.

It's really quite ridiculous. The worst offenders are WordPress/WooCommerce sites. Dedicated e-commerce solutions usually fare better.


to quote you " ... re-generated when stock changes..." - that's exactly the correct wording, except it doesn't happen a few times per week, but a few times per millisecond if you're Amazon. Or a few times per minute if you're a national supplier, any country you want, and you have a sale on Black Friday. That, of course, assumes you want to have almost real-time inventory stock to show to your possible clients. Otherwise, if you don't care to show out of stock items, sure, it can be a few times per week.


But they don't even solve that problem! In both shops that I use (rosebikes.fr and decathlon.fr) stocks are explicitly marked as approximate, with a very visible warning in red when the stock is 2 or 1 items, asking you to call the shop to verify stock. Website is slow as molasses still.


In those particular cases then yeah, it might be a sloppy job, but you didn't made it sound like that initially, instead let us believe you meant it generally speaking




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: