When possible, use open source software that isn’t developed by commercial entities (yes that also disqualifies all real browsers available - maybe Ladybird will be different? But then the specs themselves for the web are so bloated it takes too long to implement them and you have to cut corners).
Thing with for-profit development is that micro-optimizations don’t make fiscal sense. Say it takes 10 seconds for an API call. That’s too long if it’s supposed to be an interactive website! You spend 4 hours getting 9 seconds off by improving multiple problematic methods. Now the next 900 milliseconds? Maybe that’ll take you 10 hours. Fun? Absolutely, I live for that shit. But in most commercial environments this would be considered a waste of time because I could spend it doing something more impactful.
And anything being twice as fast or memory efficient is usually not noticeable. If you’re going to optimize something, it should be at least an order of magnitude. Therefore everything but low hanging fruits often gets ignored. Usually it’s a case of reconsidering your data structures to be able to use better algorithms, or reconsidering the business requirements to get rid of some processing that could be avoided. The former requires architectural insight not every developer has, plus agreement among devs. The latter may require outright navigating office politics to get product team to drop some low business impact feature requirement that has high impact on performance.
stewi1914@sh.itjust.works 11 months ago
Sometimes optimizing code comes at the cost of extra time and effort, but I often see projects bury themselves with pointless complexity that slows both development and execution down.
If developers didn’t have this stupid idea that they need to be typing to be productive, we could save a lot of pain. Sure you might see a solution to a problem that e.g. uses a sorting algorithm, and you can pretty quickly pull a perfectly fine sorting algorithm out your ass in a minute, but what if sorting is completely unnecessary?
Questions like “can I remove the need for sorting” are never asked, and instead we waste time answering questions like “what is the fastest sorting algorithm”.
Sometimes spending an entire day staring into the screen without writing any code is exactly what’s needed to save time and produce a better solution.