These are called opportunities
fabiensanglard.net
fabiensanglard.net
Math hard is when to get something to work it's really hard "mentally" to achieve/produce/figure out, but when it works it's not a problem anymore and you can explain it to kids (like Pythagorean theorem). Bodybuilding hard is when there is clear and simple "process" to achieve a thing, but it's really hard to stick to it, because to not do so is way easier.
In coding e.g, it's boring to refactor and optimize code and not put all stuff in one place and write shitty functions.
In actual software development/management (one level "above") it seems it's really really hard for the team/company/PM/CEO to fight bloat. It's hard not to go for building new stuff and adding features. There is nothing to talk about and waste meetings on and add administrative and marketing staff early on if you're not working to "add new features". Mainly because there is no definable primary feature, no actual purpose for the software, no really good coders, and in 99% of cases no actual product and / or underlying business.
Incentives are totally misaligned but I can't imagine the situation will change anytime soon.
Also, feature design is "playtime" for most founders/devs/designers/productGuys/managers. Thinking up cool new stuff that your product can do is fun. And, once thought up, it's hard to put that feature aside. "Wouldn't it be cool if it did this..." is easy and fun. Managing the ensuing bloat and complexity is hard and not fun.
I've done it a hundred times, little driveby features like Dark Mode that take a couple hours to implement (but no customer asked for). Then 3 months later it breaks randomly from a dependency update and it's another 2 hours to fix it. Then it adds half a day to creating a new feature that people actually did ask for. And so on. The cost of that little thing adds up and up.
I'm starting to think that product design time should be handed out as a reward, rather than seen as work.
As devs we know it's a good thing, but try explaining to the average manager why we're going to spend dev time removing features instead of adding new ones. It'll be a hard conversation ;)
Though I don’t have an answer for how to align incentives correctly in a modern company. If you have one visionary who owns the product forever and happens to care about UX, you can do it. But that’s not how companies work today.
The reality is that they didn't know how to fix the speed issues.
It is easy to debug a js function, but what about when you use angular or any other js framework ?
Two things put me off, I do wonder if anyone else here has attempted to do it as a consultant?
Firstly, while I could quickly identify the cause of the slowdowns, the previous times I've done this I already had an intimate knowledge of the codebase so could confidently fix the problem. Without an intimate knowledge of the codebase, I fear I'd either muck up the fix, or that I'd have to rely on internal developers who, as you say, would deprioritize it or feel resentful at an outsider coming in and from their perspective effectively telling them their code is "bad" (even though I understand how these speed issues develop organically). Or would it be enough to just offer the diagnosis, but not the fix, and thus give ammo to the PMs/senior management to take the problem to their own developers and say "look, we've been told there's a problem and it's fixable, go fix it".
Secondly, how to handle getting access to their codebase/a proper debug environment that reflects production for such a short time. Again I fear it would turn into a "not my problem" scenario of trying to get a live environment setup from people who don't want to give it to you. Fixing these problems usually turns out to be fairly quick once you've identified the real cause. I can do a quick analysis just with access to a website (i.e. is it a back-end or front-end problem), but until you can run diagnostics you can't say exactly which loop/sql statement/js compilation issue/etc. is causing the problem.
I don't think you can offer it as a consultancy service because people tend not to care and are quite aggressive about that. They would much prefer to pay for more hardware and doing so is organisationally respectable: "the cloud will solve our problems".
I think programmers might not care, I'm not sure their managers and PMs don't.
Hiring ex C/C++ game developers is fine on the surface. They are smart people and can pick up things quickly.
But as a general rule it fails.
Taking longer to get things perfect is usually not a tradeoff in the webworld that makes sense. People want simple, reuseble and quickly changable features. Pixel perfect perhaps but never code perfect because things change quickly. Why would you hire for that?
Higher salaries for no reason.
Learning curve will be harder than one expects
Smaller pool.
Greater unhappiness. You might hear after writing a game engine that web work is 90% easier but so boring.
Hire an ex c/c++ developer because they show an interest in making a change and are willing to put in the work. Don't hire all of them and expect an advantage..
Also, the typical game is significantly larger than any single gamer experiences, and game developers certainly know the tradeoff of "good enough". Plus game production environment is a technological feat in itself too, and it is those type of game developers that contain the most value - not necessarily the game play developers, but the game production pipeline developers.
I've seen before code where premature, pointless or unclear optimizations used, like dogmatically using stringbuilders or avoiding boxing saving all of a couple of nano-seconds, while the SQL statement is taking 3 seconds to run due to unnecessary sub-selects because the developer doesn't grok set-based logic. Or worse, cursors because they think they need a loop!
Just like I can't imagine the true depth of complexity of game/3d development having dabbled making games in unity, I'm not sure you understand just how complex a sass/enterprise site can get, it's usually issues with actually organising the code that gets you, rather than the code itself.
Your example of i18n is actually quite telling, having internationalized a couple of sites that's actually a fairly simple organizational problem in our codebases, comparatively not really complex at all, just tedious.
My example intended to reference more than i18n, as that only covers the interface. Consider something like an online international university where there is media, but that media varies with 8 different languages, so each and every aspect of any presentation needs to accommodate variable length text fields, left and right and vertical directions of text display, every media clip varies in length due to language, and multi-language users can switch display mode at will. I've done projects like this, over a dozen, and it's quite the challenge.
The company I worked for offered very expensive timesharing by the hour. Clients used an "Englishy" interpreted language to do economic forecasts, and client staff often programmed their own procedures.
My boss came to me one day to request that I speed up something a client had developed themselves, because it had become too expensive for them to run, and they were ready to bolt.
I had no desire to understand what their code did, and so treated the code mostly like a blackbox, and my job as speeding things up while leaving the transformation of inputs to particular outputs intact.
I had enough experience to know what the low hanging fruit were and went after those in the code. A day's work or so, and we got a 50-90% speed-up, enough to satisfy the client. I still don't really know what the code did. But I enjoyed the effort.
This sounds more like an organizational problem. The project leader has to decide whether speed issues need fixing or not. If they don't need fixing, then it is indeed a wasted resources trying to do so. If they need fixing, then of course it is the task for the project leader to find the neccessary resources.
Speed issues are almost never unfixable. But, the cost of doing so might be prohibitive, usually companies deliver products which are just fast enough. The question is, with a given budget, how do you ship the better product for the customers needs? Do you want it to be fast with fewer features or not quite as fast, but having many more required features? To decide this, it is the job of the project lead, the architects and of course marketing, which has to sell the product.
And both as a project lead and a developer, I can say, it is really fun to make something faster and more efficient, but far too often there isn't the time/resources for it. Most of the time you have a customer waiting for new functionality or bug fixes much more urgently than for some speed improvements.
Speed, features and bug fixes are all different forms of value. But value isn't an absolute. It's always in the eye of the beholder and depending on where a stakeholder is coming from, they are prioritized differently.
From a business perspective, balancing between different types of values is paramount. The end goal, after all, is to always deliver value that generates revenue exceeding expenses at an acceptable level.
This is why legacy software is a thing. The business assesses that an old tool still generates value for paying customers and revenue while spending an acceptable amount of time on maintenance. In the context of a large system with a large userbase, this may imply dedicating one or two developers full time towards keeping the lights on.
Many software projects don't get a rewrite. Why? Because over the course of years, business and technological contexts for all stakeholders - both the business and the customers - change so much that they become irrelevant. For instance, the business pivoting away towards a new lucrative market or product, or customers moving away to a competitor offering the same value but at a better price point and with up-to-date technology. Just consider many services and products you've used over the years and how many of them have been shelved or sunset without ever being rewritten.
While the necessity of a full rewrite may pop up over technical concerns such as security or performance. It's only when business and functional requirements have shifted away to a serious degree from the original scope of the project that organizations tend to consider dedicating time and resources to a successor. At that time, a rewrite isn't necessarily the only option: sourcing a product that does the same thing but better from an outside supplier could be a valid option as well. For instance, chucking away your own homegrown decade old CRM for Salesforce as your business grew from a 5 person outfit to a 120 person business servicing enterprise.
In my experience it is always the PM or product owner telling me not to work on improving speed. How slow was the app, I guess the devs would be right if it was like 2 seconds or less to load/render, at that point working on speed has diminishing returns.
You generally don't need to debug the framework. Just follow some simple best practices and the performance will just happen in 99% of cases.
As someone who worked on a successful web-application perf-improvement project in a past life, my top 3 tricks were: 1. Profile, and use flame-graphs & call-graphs (with counts) to identify which parts are slow 2. Don't do unnecessary work 3. Execute code asynchronously whenever possible (requires balancing with code readability)
Not doing unnecessary work may be straight forward, and sometimes very complicated. Simple: some results are discarded, or some expensive functions are called for a minor side-effect just because developers were told to "maximize code reuse" at all costs. Complicated: understanding which function calls that unexpectedly block/delay browser rendering/painting
But your point is correct in that in many projects there isn't enough budget to make the product faster. Which is a project management decisions, not that the speed issues are unfixable.
Implementing some feature, fixing a bug, refactoring code to improve DX? Sure, happy to do, you don’t even have to ask. Plotting tail response times, flame charts, allocation pressure, DOM changesets, database execution plans? No chance, unless the PM forces the matter.
My hope is that some of that can be taught and embedded into the team culture, but the reality is that day-to-day web development is simply too far abstracted from the underlying software and hardware, and getting your average javascript programmer to care about milliseconds is an uphill battle.
The sad thing is that users do definitely care, and the evidence shows up again and again: user behaviour tests for 100ms vs 500ms responses, the reviews of the new M1 processors, ...
Is anybody even teaching people these things? I do the above as a matter of course, but I've learned how and why through osmosis, over the years, mostly because I dabble with gamedev as a hobby (and because I care about performance). None of that was covered in any of my university courses. And, out of the people I worked with, I was and am literally the only one who knows how to do any of that.
I don't expect my colleagues to have the same kind of experience, but I would expect someone presenting as a "senior frontend engineer" to understand the GC impact of allocating thousands of objects in a tight computation loop; or of doing heavy computations / updating the DOM inside a mouse move event handler.
On the other hand, Slack is worth $27.7B and is still selling a product that has frustrating multi-second delays on standard keyboard interactions, so I don't know. Maybe I am really just expecting too much.
I've definitely seen both in the wild, so it's an important question to ask every time, rather than sticking to a blanket assumption of "devs neither understand nor care about performance optimization".
However, we also have MR's where e.g. moving the mouse causes jank / slows updates down to <20 fps. Doing a paired review on those leads to the observations above: many developers simply don't know how to measure and optimize code, and even less how to estimate impact before writing that code. It would be easy to dismiss this as "bad developers", but I've seen it so many times over the last two decades that I think it runs deeper than that.
And then we all end up on HN with our favourite complaint: slow bloated Electron apps - except VSCode which is fast. The problem is not Electron, it's a systematic lack of knowledge and incentives about performance in the field.
Is it, though? I'll give VSCode credit for being better than your average Electron app, but it (and Azure Data Studio, which last I checked is based on VSCode) ain't exactly a speed demon, either. Then again, I'm typically running something like Emacs, which is a lot lighter-weight (at least before I blow up ~/.emacs.d), so I'm probably just spoiled :)
It's certainly faster than Visual Studio, but it also has far fewer features.
Has anyone ever done an analysis of what exactly VSCode does differently than a typical Electron app? Where it deviates from the garden path?
here in my city I can pull out a sticky mud-encrusted motherboard and GPU from the flea markets - scrub it down with a bit of isopropyl alcohol, and put together something as responsive as a 2015 macbook air for 20 euro (PopOS is a favourite for this).
in an agency, you have an MBP thrust upon you, and your software “works fine on [our] computers”. end users still be running a last generation of CPU will eventually decide “I need a new computer”, and the cycle is complete.
its not that developers dont care, its that they’re never given the chance to care under these ... circumstances.
> This performance management works by looking at a combination of the device temperature, battery state of charge, and battery impedance. Only if these variables require it, iOS will dynamically manage the maximum performance of some system components, such as the CPU and GPU, in order to prevent unexpected shutdowns.
b) At any rate, “Apple deceitfully handicapped older products to cover up a more serious (but fixable) flaw, knowingly pushing customers into unnecessary upgrades” is really not any better than “Apple deceitfully handicapped older devices to push consumers into unnecessary upgrades.”
In this specific case Apple and Samsung have been proven dishonest and manipulative, and they have a far stronger legal/financial incentive to lie than separate groups of prosecutors in the US and many separate EU member states. I also find a conspiracy internal to Apple/Samsung much more plausible than a conspiracy across attorneys general from 34 US states.
Only trusting viewpoints that agree with your personal biases isn't enlightened, either.
> "In this specific case Apple and Samsung have been proven dishonest and manipulative"
is an unvarnished falsehood. The throttling wasn't across the board, it was triggered in specific circumstances related to the state of the battery. There was never any evidence that this was a scheme to defraud customers.
This is the same company that removed the headphone jack for very cynical reasons, in order to increase the sale price of their phone by $150 (or however much the Airpods cost). The same company that repeatedly removed ports from the laptops in order to sell more dongles (so much so that there were running gags at the time about Apple, the dongle company). A company where the revenue from the sale of accessories for their devices could literally make a Fortune 1000 company (!!!).
They definitely knew what they were doing and chose to do the thing that most benefited their bottom line.
Let's stop giving the benefit of the doubt to the top tech companies. They don't deserve it like mom and pop stores.
Oblio's Law: Never attribute to malice that which can be attributed to stupidity, unless the ones acting have an army of data scientists, researchers, market analysts and PR people at their disposal.
Imho there's a reasonable case that they did the thing which best protected users older devices and daily usable time, and I think most users would prefer their phone stays working for a day on a single charge, so they can make and receive calls and messages towards the end of the day.
It's possible Apple wasn't thinking of the users, but it's not a clear cut case.
It's also possible that if Apple hadn't slowed the older phones down as batteries wore out, they would have seen more sales as users needed to replace their phones more urgently as battery life dropped. So it's not obvious that the action they took favoured sales anyway.
Court cases are rarely won, especially with big companies. They have the money to drag them out so most are just settled. So in my eyes any class action lawsuit a company settles for millions is a case they lost.
When will you admit that it was a clear case? They just admitted it themselves by settling!
I give up :-)
Because that is good for the environment :)
If only we could popularize an analogous law for software performance…
Unless you have a performance issue that’s really pathological, speed really doesn’t matter for most applications. I’ve developed dozens of python web applications. Python is slow as hell, but I can count on one hand the number of times hand where I found the RoI of optimizing a performance issue to be more valuable than feature development (and all of them were problems that couldn’t be solved with more hardware, which is the default best-RoI way to approach most performance issues).
But if a UI is slow, that does matter. Delayed keypresses, unacknowledged but registered interactions, or the worst, delayed layout changes, are completely flow breaking.
I hate Jira - but I think the main reason is just that it feels slow to use. A slow UI gives a visceral felt sense of lethargy / sickness, which I associate with the product. Is that a bug? I don't know. But I bet it runs fast enough internally at atlassian. And I suspect the PMs at atlassian tell themselves the same story - that its not worth the development time to make it fast. And that might match with the feedback they get, because all the users who care about that have probably already bounced to other products.
What you said about impressing the person viewing the reports really rings true in that case.
I’ve built frontends before without giving any consideration at all to performance, and they’ve always performed perfectly well. Websites like cnn.com exist, so it is demonstrably possibly to do it badly, but you have to stray so far from the light accomplish something like that.
I don't agree. It's only software developers that think that way with their latest gadgets, fast internet at high tech buildings; not the users.
But that’s really besides the point. As long as an application is fast enough that a user doesn’t notice a problem with it, then you’re done optimizing for performance (in most cases at least). So if new hardware comes out that’s twice as fast, you could very sensibly keep the performance at the same acceptable level, and use the new performance budget in other ways. Such as by introducing various inefficiencies via abstractions that make feature development faster.
Most of those "abstractions" and "development" are working against the user anyway: most webpages have not added features in more than 20 years but still require more power because developers can't get their shit together.
Speed is the reason people bought SSDs. It's the whole core of Apple's M1 Marketing. It's probably the biggest reason why people buy new computers. Lack of speed is the reason I had to throw away my Smart TV after 8 years of useless upgrades.
People pay more for faster internet because they want more movies in bigger quality or to download big things faster. Not because they give a crap about your shitty app.
> Unless you have a performance issue that’s really pathological, speed really doesn’t matter for most applications
And that's only true because developers are constantly forcing hardware developers and customers to throw money at the problem.
So business just buy better available hardware rather than spending time optimizing and end user want usually the cheapest product.
There are only a few organizations like Sublime HQ who focus on fast software. But they are producing niche products, catering to other software developers who appreciate the fast nature of their software and have the money to spend on it. I personally bought Sublime Merge and my IT friends who make a lot of money are perplexed by my decision spending 100 on an amazing development tool.
I also sometimes dream with my programming buddy about creating a company which creates fast software like Sublime HQ, but it is really hard to sell this kind of software.
I mean I'm still writing CRUD software ten years later; the tools have changed from idk, jquery mobile and php to React and go, but I don't feel any faster doing it. I want to say that things like form validation are faster and easier now, but no, they've just been reinvented a few times with changing underlying technology. I want to say that they solved the ORM problem, but nope, still crap, and again because of having to re-invent the wheel for a new language, environment, and generation of developers. Did the existing tools and languages improve much? Also no, at least not that I know of, still wouldn't use Hibernate if I can help it.
So in many ways things feel like they have advanced, but at least speaking for myself, at the same time things feel like they are still the same.
At least for the moment my Go application recompiles / restarts much faster than the old Java / Spring applications I used to work with. Which puts it on par with the PHP experience from before that.
And it felt especially true in the field of Web Technologies.
>at the same time things feel like they are still the same.
In the past few years I have always felt things are far too complex. We just didn't make anything simpler.
We invent new problems to solve, and we do solve them, but still are left with the same old problems.
As a graphics programmer I feel things have moved very far in the right direction within the last ten years.
I used to write generic computations disguised as pixel rendering without any decent tools for diagnostics or profiling.
Now I can just use a compute shader and if I want to debug or profile it there are so many great alternatives.
I recently re-implemented a particle simulation I first wrote in 2011. Without access to the pervious code.
The first time around it took me months. Now it took me days. Sure, I've learned a lot since, but a lot of the speedup was just from better language and tool support for what I wanted to do.
I’d actually say forms are more of a pain in an SPA than they are with server rendering.
You have to track the state of every field so input doesn’t get clobbered on a re-render, which isn’t difficult but can be pretty tedious, especially if it’s a very dynamic form. And if you want native input attributes like `required` to work you need to still do a native form submission, but then intercept it and do your AJAX request or whatever instead.
The only part that’s really easier is handling server-side validation errors, because instead of trying to re-construct the populated form using the submitted input, you can just leave it all on screen.
This is one of the aspects where optimizations starts making sense again.
It's hard to sell software just on speed, but it is an integral part of good UX (that feeling of a good, light weight, robust piece of software that is there to help instead of hinder). I for one desire that a lot and I think many others do too (see the success of Apple).
This test can never get any slower.
That's actually very similar to how Safari was built.
After Steve showed the Safari icon, he clicked to the next slide. It had a single word: Why? Steve felt the need to say why Apple had made its own browser, and his explanation led with speed. Some may have thought that touting Safari performance was just marketing, a retrospective cherry-picking of one browser attribute that just happened to turn out well. I knew better. I had been part of the team that had received the speed mandate months earlier, and I had participated in the actions he now described which ensured the speed of our browser." [1]
[1] Kocienda, Ken. Creative Selection: Inside Apple's Design Process During the Golden Age of Steve Jobs
https://donmelton.com/2013/01/10/safari-is-released-to-the-w...
Also, if there were Safari APIs for all their fancy chip features, developers might actually use them widely.
The problem is that if this happened, Apple would lose its monopoly on a good app experience. They need web technology to be crappy, and poor performance is part of that picture.
WebGL2 support is just about ready in Safari. They are just about fully moved over to using ANGLE as the WebGL backend which includes WebGL2 support. I tested it out with my app on the Safari Technology Preview and it was flawless (as expected from using ANGLE in Chrome).
We still care about start-up time, but there's diminishing returns to this sort of optimization. Moreover, the developer teams have to balance these factors with a variety of other product features and with optimizations for developer productivity.
Gains in hardware performance might be wasted by slow software, but "fast software" can certainly reap the benefits. By "fast software", I mean computation heavy workloads like ML training, image processing, etc. The article touches on this.
> But doing the same thing should never become slower. Starting up an application should never take longer than it used to.
I would not consider starting up Xcode in 2008 and starting up Xcode in 2020 to be "doing the same thing". Through many years of updates, this application has become very different. I personally don't use Xcode, but I would hope that Xcode 2020 has more features than Xcode 2008.
Now, whether Xcode 2020 actually NEEDS all those new features is a different questions, especially if it comes at a cost to start-up time. As individual users, it may feel like we have no choice in these decisions.
However, the optimist in me wants to think that we DO have a choice. We can still "vote with our behavior". If Xcode is too slow, users will stop using it and prefer alternatives that provide the performance that we want. However, if users continue to use Xcode in spite of slow start-up time, then perhaps there's something more important that's keeping users around.
No, not really, and definitely none that need to be initialized at application startup. There are some truly baffling performance regressions in Xcode over the last years. Like starting for the first time into the debugger taking almost half a minute.
> If Xcode is too slow, users will stop using it and prefer alternatives that provide the performance that we want.
There are no alternatives if you want to build iOS applications. You'll at least need to use the Xcode command line tools for this, and some of the performance problems (like the slow start into the debugger) seem to be rooted there, because VSCode has the same problem.
My word processor today is about as UI responsive as MS Word was in the 90’s and I use pretty much the same features now as I did before. Visual Studio Code’s UI is noticeably slower on my modern CPU than Visual C++ 6 was 30 years ago, although to be fair it compiles much faster today.
1: https://randomascii.wordpress.com/2017/07/09/24-core-cpu-and...
If the software is maintainable and has less bugs, this is not a crazy way to spend the cycles.
Web browsers run insanely stable over very long periods of time when you consider what's under to hood.
Make it work, then make it right, then make it fast. We shouldn't even begin to worry about performance until we've got a handle on correctness, and frankly software in general isn't there yet.
Also, arguably, auto-saving existed in 90s - and the primary reasons it wasn't as nice as it was today were UX (wasn't enabled by default IIRC) and hardware (spinning rust wasn't good enough to support transparent auto-saving every other second).
So do crashes, and so especially does silently outputting the wrong answer. Slow but reliable beats fast but flaky every time, and it's much easier to speed up a working program than fix a flaky one.
It's not?
Consider: to make your workflow easier, you impose costs - real costs, in both emotions and money - on every single one of your users. And the more users you gain, the more the society ultimately pays for a fixed benefit of making it easier for your team to do the work.
To some degree, this trade-off is necessary, but I propose that it's absolutely crazy to consider taking it unless it is necessary.
I personally use it as a sanity check. I look at the amount of data processing the software I'm building does, compare it mentally against the amount of data processing a random videogame from 10 years ago did, and ask myself (and the team), how come our software does much less work than that game, and runs much slower than that game did a decade ago?
(And the answer very often boils down to: lots of unnecessary parsing or string processing, and bad choices in data structures. Both relatively easily fixable, if one bothers to look for it - and both mistakes that could have been avoided in the first place at little to no cost in developer effort.)
Ha! Are you saying the old games that ran faster didn't bring us joy?
We need to question ourselves every now and then why we are adding things like cutting edge graphics to games (and adding complexity in general). Which is what this article is about.
I care about how fast said applications do their job, that they remain responsive and don't suffer from instability.
Maybe I am just old/desktop user. My machine is a 9900K + 32GB RAM which is definitely fast but it's not absurd. With this amount of RAM I never feel the need to close anything other than to tidy up my list of open tabs so I can see the icons without scrolling again.
The 9900k appears to have similar compute throughput to a Top 500 supercomputer from 2004, a time when my Northwood P4 with 512MB RAM, and Radeon 8500 were quite comfortable running Firefox at 1600x1200 @ 85hz.
A 9900K + 32G quite frankly represents an embarrassment of computing riches and the marginal improvements in end-user experience since then (mostly in the form of additional screen real estate) betray just how little we've done with that compute that truly benefits the user.
It’s clear that all of these things never get tested beyond the high-powered machine that the developer used. And I don’t see the trend of developers being completely out of touch of what devices their users are using going away anytime soon. But maybe we should start considering “experience correction” tools as part of a regular testing methodology. A friend of mine once lamented that the web would be a much better place if opening the Chrome developer tools automatically enabled the network throttler, and I think I’d have to agree with him.
Your job isn't to build the smoothest, most optimized, experience for your customers. It's to build features customers want or need, which in turn create value for your employer. This generated value pays your paycheck. Of course if you do a bad enough job, it's counterproductive, but to the extent it's not bad enough your job is to focus on features and development and not on optimization. Once performance is bad enough, your job becomes optimization -- via instrumentation, measurement and profiling.
Every minute you spend waiting on a build or waiting for an app to launch or waiting for some long-running task to finish is a minute you're not creating value. Compounding this problem, it impacts morale if you spend your day looking at spinning beach balls while your boss won't get off your back about when you'll be done.
This is your employer's perspective, more than likely.
[edit] Another way of looking at this is to say that you and your customers are doing different jobs. You have all the extra cpu and memory overhead of developing a product — all they have to do is run it. By definition your workload is more demanding.
And, this is a personal anecdote of course, but sometimes having fast machines can paper over problems that you should really be addressing: I had a coworker once who temporarily used a fairly (~7 years) old machine to do their development work until they could get something newer to work on. During that time I noticed that they would take a while to make minor fixes after reviews. I asked them why and they told me that they would make the change and then they'd build it and it was taking dozens of minutes–it turns out that there was a creeping dependency tracking issue in the build process that nobody had bothered to address yet because it didn't seem like a huge issue on our normal machines. But fixing it certainly got his turnaround time way up, and the CI machines really liked the change too ;)
Or you should -know- what specs your users are using (this is really not hard) and optimize for that.
You can get chrome to degrade network performance etc. It's not easy to downgrade machine performance tho.
I can count on one hand the number of companies I've worked at in the last decade who had in-house QA teams. Most companies just rely on the developers to test their (our) own code. The exceptions are banks, gamedev companies and big corp products (like Windows).
Most web software I've seen - especially in the startup world - just assumes that "it works well enough on the developers' specced out mac" means it works. The most tragic version of this I saw was our app looking awful on a ‘normal’ 19” desktop monitor. The problem was our designers did all their work from 27" imacs. They never thought to design and test on smaller displays. Or the designers placing adjacent colors that look great on color graded displays but are almost indistinguishable on the trashy 6 bit TN displays that were ubiquitous in offices a few years ago.
Even in companies with dedicated QA I haven't seen many tickets of the form of "the program runs slowly on this old computer we have". Sadly the creeping performance rot is mostly invisible.
Honestly, people running slow computers are probably just used to poor performance. I fully agree with you that we should do something about it but I don't see that happening unless it's a strong priority (feature X/y/z or performance? is usually the conversation).
Anecdotally: I'll never forget the first time I launched an app from an SSD and vowed I was never going back.
It's not as easy to do this as it could be, but it's not that hard either.
It doesn’t have to be either/or, it can be both. Developers absolutely should be using their own software frequently, seeing and feeling how well it performs; trying it out on a lower-spec machine is always a useful exercise.
That doesn’t mean you can’t also have dedicated QA. Developers shouldn’t have to be in charge of QA, but they should have some involvement.
Hypervisor / virtualization tech should mean you get very close to actual host OS performance. Otherwise this whole container thing wouldn't work so hot?
yes > /dev/null &
Repeat until slow ;)If you fail to make those consistently you end up with large infrastructure bills and unhappy customers eventually.
That is literally my job! You should have someone like that too, or else you'll end up shipping an Electron app like Discord does.
And get to dominate their market niche?
People got to realize while native apps are nice and all, there is absolutely zero evidence that going native vs cross-platform improves any metric a business actually cares about. Users are flocking to cross-platform apps in droves!
Vocal message board users screaming their preference for native apps are not in any way a significant share of the actual market for these applications.
I seriously doubt the use of Electron is what's driving that.
And it's also worth remembering that "cross-platform" ≠ "bundle an entire web browser in the app". Qt exists, as one of many examples of application frameworks/toolkits that are simultaneously cross-platform and native.
It is indirectly driving that.
Using Electron instead of other cross-platform frameworks like Qt allows one to work faster since you can apply webdev knowledge, and that directly leads to features that users actually care about being delivered faster.
Like, if you just need to spit out a prototype to hit the ground running fast, then fine, but long-term there are pretty clear benefits to using the right tool for the job.
The "work faster" argument is pretty dubious on its own anyway; yeah, maybe web devs ain't particularly productive with Qt or similar frameworks, but desktop devs absolutely can (and arguably should) be productive with such a framework.
There is no evidence to believe that users are concerned about RAM usage to any level that would move them over to competing apps.
> The "work faster" argument is pretty dubious on its own anyway; yeah, maybe web devs ain't particularly productive with Qt or similar frameworks, but desktop devs absolutely can (and arguably should) be productive with such a framework.
There are orders of magnitude more web devs than devs who are even just familiar with desktop GUI toolkits. Even if you can find people who are just as productive with (for example) Qt, they'd be (way) more expensive than the average web dev.
And, again, now you have less budget to spend on things that actually gets you users.
Do you know that writing code efficiently can also save money for the company? If you try to write code that burns bandwidth or CPU cycles without even attempting to optimize it, it's gonna cost you an eye at the end of the year.
Software optimized for the slowest hardware possible actually does saves money, which helps also to reach the goal of doing more money, since more hardware is being supported, not only the cutting-edge one.
I've seeing now this infamous trend also on Android Phones boosting 90-120 Hz screens. If applications get optimized to run on these phones, whose CPU is also strong, obviously older phones are suffering and become sluggish.
Seriously, try to write code as your target platform is a Raspberry Pi 1 model. If works on it fast, it's going to be fast everywhere
Those managers were eventually all let go and one of the first things new management did was buy us the most powerful machines they could find and institute performance regression tests that rachetted down. Each change could only keep the existing performance or make it faster. And changes that made it faster set the new watermark. Regressions required management approval.
After performance having been unimproved for a year, it was largely resolved in 6 months.
Since then I’ve been a believer that you give your developers nearly the fastest platform money can buy but then have automated, gatekeeping tests for your lowest target platform, with spot checking to make sure your tests reflect actual user experienced performance on that platform.
at our BigCo these days we have a modern, dare i say Cloud Native, version of this stupidity - developers can't get even minimally powerful and reliably provisioned cloud resources (while the official rationale is similar to what you described the real one is much worse - it is just penny pinching). So it isn't just slow and unreliable, the real humongous cherry on top is that it has very short lifetime enforced by automatic deprovisioning - thus even when you finally were able to spin up our platform - which is far from guaranteed and may take many attempts as the platform is the product what we're developing, and it naturally has issues, etc. - and now you're happy and ready to start working on it, and at that moment it all disappears because of that short lifetime enforcing automated deprovisioning. Thus not surprisingly the results are exactly as you described - despite the management running around chanting cloud!cloud!cloud! our products' cloud story has so far made it practically nowhere .
I live in a world where I cannot make performance evaluations based on my benchmarks on my "normal" build- I have to switch to a release build and recompile everything in order to make performance determinations. This led to my first personal experience of "premature optimization is the root of all evil". I implemented a new feature, performance was completely fucking untenably awful, so I threaded it. Performance was still awful, but it was 7x better because I has 7 free cores (8 total cores) to play with. I thought great, I tested, I found the bottleneck, I bandwidthed the fuuuck out the bottleneck, problem solved. A few weeks later I was testing on a release build, and in the same feature, the aforementioned bottleneck was using roughly 5% of the total CPU usage. Because the optimizer just - fixed all the slow stuff. The bottleneck that I threaded the shit out of didn't contribute significantly to the total CPU usage of the release build, while it was 87.5% or whatever of the debug build. And in the release build, I'm pretty sure all the threading overhead I added took away any and all benefit.
The thing I learned from that experience was to ignore all performance problems unless I observe them in a release build. If I had a faster computer, it would be significantly easier for me to switch back and forth between release and debug builds. And I would thus be able to observe performance problems easier.
I imagine there's a significant divide between front end web development and desktop application development here.
If you have a computer fast enough to do a release build quickly, it’s probably also fast enough to hide performance problems with the release build.
There are other approaches that can work, like building in the cloud so you don’t need a huge fast PC for each developer, or doing partially-optimized builds that balance build time with runtime (and debuggability).
This. And if it could also throttle CPU performance, painting performance, and available cache memory to a "typical user" profile that would be ideal.
It would be best of all if that typical profile varied from day to day to cover a range of experiences of typical users, but the distribution was updated periodically from the lower quartile of the general web user population as measured by surveys.
In general: Fast developer machine for builds, slow runtime machine for using the application.
(In embedded and console games this has always been automatic :-)
If you don't run the application on a separate machine, then simulate one instead.
But there's no advantage in making IDEs, compiles and testsuites run slowly. Just the target application.
I'm not quite sure how much Apple shared publicly, but there was an iOS version that caused huge performance hit for older phones (honestly, it's kind of common with new major versions, but this was an outlier). They had a .5 release that tried to improve performance. My understanding is that, like you said, developers had been developing on the newest hardware. Apple seems to be more sensitive to this and it's not because performance for phones have plateaued, but I've noticed specific regressions here and there. I remember one iPhone specifically demoed how fast the camera launched. After a few OS updates the performance was as miserable as the phones they had been mocking.
I know console developers deal with this, too. Their SDK hardware has more RAM than production hardware, but their tools generally have big flashing alarms when you exceed the memory used in production.
I eventually helped design and deployed high quality LTE modems, which were awesome (with the right antennas, internet was good even in places where a phone would show no signal... but obviously the boonies on land are different than at sea!)
This is also part of the reason I am so cli/tui focused. I want to be able to run a full environment from ssh. (screen and mosh help with disconnects and instability)
Product managers and designers should use average equipment for their target market.
Your equipment should allow you to do your job better, not show your rank.
The other thing to consider is that when you’re hiring software engineers, your competing with everybody else who’s also trying to hire software engineers. So if a candidate sees all your engineers using a laptop that they don’t want to use, they’re likely to take that into consideration when deciding whether they want to work for you. Expensive laptops, free food/drink, a gym, free massages, and all of those other perks you might find in software companies sound extravagant, but they’re such an easy and cost effective way to compete with other employers.
My work desktop is over 5 years old and still perfectly usable.
If we happen to get a customer laptop from their IT for accessing their internal network instead of some cloud instance, you can bet it is most likely fitted with 8GB and a regular HDD.
It is only on HN and Reddit bubbles that I get to see people using the very latest and greatest.
Ah, and I was part of a project a couple of years ago, where teams focused on Windows machines and literally timeshared iMacs and the respective iDevices for testing their hybrid apps.
Then again, even if a developer cares about performance, if it's not set as the main goal or given any resources to pursue, it will still not get the much deserved attention.
Performance on lower grade consumer devices should absolutely be a minimum pass criterions, but if it isn't, giving developers older devices will not help.
I’ve worked at several production companies, games & films, that had policies of giving devs the worst machines. The thinking being that artists who use the tools should always feel less pain than the devs who make the tools, not more.
Not sure what that dollar figure looks like though.
I'm writing this on a 2011 Mac. Well maintained.
- First of all, faster hardware means better productivity. If you want the developers have time to optimize for speed, better give them the time for this. Cutting their productivity usually means, less time is spend on optimizing, all "features" need to be implemented first. Only when all "features" have been implemented, quality improvements get scheduled. You want developers to be productive enough that they get time to improve quality/speed.
- Developers are running the application completely differently than the end users. If an application is run for hours if not even days at a time, startup speed doesn't count much. A developer might have to restart an application for debugging something every minute[1]. Having the developer waiting on startup would be a bad waste of time. While it might be nice to optimize startup times, the really might not be customer-relevant.
- Developers often run unoptimized code with debug code present or even inside a debugger. This makes the code often slower than the customer experience.
- Developers might have to run several instances of the application at the same time, requiring the neccessary compute resources, also the development environments need to be powered.
- And to some extend, which gets revived by the power of these new chips, development often happens years before a product ships. What is an exotic and expensive machine at the project start, might be a medium range for the customer when the product ships. So the development machine was actually a good match of the deployment platform.
These are some of the reasons why developers should have powerful machines. Of course, there are also a lot of reasons to test the product on less powerful machines and set performance goals according to these tests. But this doesn't mean the developer has to do the development work on those machines. If a product doesn't get tested enough and on the right systems, it is rather a project management issue.
1: I am fortunate to do quite a bit of my work in Lisp and it is one huge productivity boost that I can update every single function redefinition in the running code. Which gives me increadibly short iteration cycles. The cost of starting up an application to test a change isn't just the startup time but also the interaction needed until you get to the point where the function is called, I am doing quite UI-centric work. This becomes very noticable, whenever I actually have to restart the application to get a meaningful test. Even worse are the situations where I even have to wait for a longer compilation run (with non-Lisp languages, like C++)
> Firefox developers famously attempted to fix the five second startup time in 2010 via bug #627591[6]. They fixed many issues but not enough to warrant a second try.
It would be a great point if Chrome still started up in under one second. In one data point, there isn't much difference. Plus I typically (re)launch the browser less than once per day. The time difference on start up isn't the deciding issue for me.
Office, Excel, Figma, 5 other web-apps, Slack, 30+ websites, Spotify - no problem.
perhaps this can be taken as a claim to being a typical consumer, as they are often described as not especially rational. (the never looking back part)
Is it possible that we're inventing all this encapsulation because we think we can escape an ugly truth at a higher layer? Is it possible that we're wrong about that?
Browsers are essentially a translation layer with some security guarantees and even there, on both counts they aren't perfect. They're merely better than the alternative.
If you ever want to disrupt the entire industry, make something that is easier to code for and more secure than a web browser. If it's faster too, then that's gravy.
So technically I'm not sure how much you can abstract away for performance.
Being able to use complex things makes you look smart.
Creating a complex system makes you look even smarter.
Ideally (IMO), if you want to optimize development time, also consider future development time.
I only say this half-jokingly.
Btw, people bring up a features vs. speed tradeoff here and I don't think it's true - in my experience perf issues come from stupid random bugs more often than they're fundamental parts of new features. There is definitely a development time vs speed tradeoff, though; the best way to save time here is to have really good regression tests.
Java, PHP, .NET, and Javascript were all slow until they got fast (although with Javascript, things got really complicated and slow again).
I say this as a developer that uses all those now-fast things and avoids the shiny and new for these reasons (and more, including lack of tooling).
That's the theory anyway, but I know in practice it's different.
I keep thinking of my time working on iOS software, where I experienced the transition from objective-C to ARC to Swift; it still felt like the end result was the same, if not even better (Swift whole-module optimization), but the developer ergonomics were much improved.
Still kinda miss xcode, a shame it's not really usable for anything that isn't obj-C/Swift.
But none of the described software is doing the same thing it was before. This author is saying "well, you know, it's still a photo editor, same thing" and "well, you know, it's still a web browser, same thing". But those are gross oversimplifications of how a major piece of software evolves over the course of a decade.
If our hardware has sped up 1000x, couldn't the software limit itself to slowing things down only 500x instead of 2000x?
Yet another post blaming developers when it's the product managers and business development people that decide the direction of the product.
Developers on this very site will happily deliver a slow running JS Electron turd if that means that they don't have to learn a new tool or use the process that isn't "fun" to them. Blaming just the business owners when the developers themselves refuse to do their job well is a bit strange.
Kinda reminds me of life in my socialist state - everyone did their minimum to tick the box they had to do and then just slacked off the rest of the time. Everything was kinda shit but it's not like anyone got paid more to do a job well, amirite?
Yeah, lets just say it is all management's fault while we develop with an eye towards leaving for greener pastures in 2 years. Ooh! Is that a new shiny framework?
Disgusting.
"But that's not fun and I don't have time, need to hack the new one!"
It really was incredible how fast Chrome seemed when it first came out; and not just in terms of startup speed; rendering speed was superb compared to the competition. Now Firefox seems much closer to Chrome in terms of rendering speed, and for certain web-pages (some company web-pages with huge tables at least) Firefox renders them noticeably faster.
I was using the WASM version of Microsoft Z3 recently (a kind of theorem prover), and it took about 15 seconds to start in Chrome, and about 2 to start in Firefox on the same machine.
It ran a bit faster in Chrome after that, but not noticeably. Startup time was a bottleneck. Imagine visiting a web app then waiting 15 seconds while it's frozen before the functionality starts working.
Also a theorem prover with kinds (or more one type of elements), if I'm not mistaken :-)
Firefox is getting really good; perhaps a bit memory hungry, but that's hardly where Chrome shines either...
"Sort" comes from many-sorted logic where the sort distinction is at the syntactic level, so easily inferred. They are not called "types" because they don't come from type theory; there is no logical richness to the relationships between different sorts, unlike the relationships between types. They are not called "kinds" because that is the name of a higher-order concept in type theory.
That was the moment, I realized that we are doing something wrong today and that performance should always be evaluated.
Not particularly. If it takes 13s to load Photoshop once a day, then I can access all these great features, that's alright with me.
When you run multiple applications, if one of them is bloated and slow, it takes up processor time and memory. This is then not available to the other applications. So your whole phone/laptop slows down. You don't blame the app. You blame the phone/laptop, and think about buying a new one. As a result, there is little incentive for app developers to create lean, speedy applications. This is a standard public goods problem.
Apple may perhaps be deliberately slowing their computers down with software upgrades, but they probably don't need to. They can just wait for app developers to do it for them.
This argument also challenges the article's optimism that slow apps create a market opening for faster apps. In particular, while faster startup is something users notice (and blame on the app), memory bloat is not. So developers are likely to (over-)optimise for startup speed, at the cost of being memory-hungry, which in time slows the whole computer down.
> But doing the same thing should never become slower. Starting up an application should never take longer than it used to. If a feature is going to cost start-up time, I would rather not have it.
No feature, no matter how great, could ever justify a slowdown to start-up time? That seems like an absurd position to take. Also, if you read the link to the “law” about software taking up more compute resources over time, you’ll find that the origin is Intel’s Andy Grove complaining that Microsoft wasn’t taking advantage of newer, more powerful chips.
Also the title is just kind of rude and dismissive to software engineers - it’s not true that noone at all cares about performance.
This is actually the WebKit project's policy. Performance regressions are not allowed and you can't commit any without adding an equivalent progression.
[1] https://en.wikipedia.org/wiki/Andy_and_Bill%27s_law
[2] https://hn.algolia.com/?q=https%3A%2F%2Ffabiensanglard.net%2...
> please use the original title, unless it is misleading or linkbait; don't editorialize
I should have checked the real article title, it’s much more reasonable. I see that it has been changed here, now.
To save dev time, people are no longer building native. And that bloat keeps adding up, masquerading as abstraction
It'd be nice to work for an org like that.
My entire career, any performance tweaking has had to be skunkworks, has never been rewarded.
At my very first tech dev job, my coworker and I speed up a novel workflow, as in brand new technology (think OCR for blueprints), about 4x faster. Made our new service practical. We were so thrilled. Boss man was unimpressed. "You should have thought of that before." I'm still angry about it. Clearly.
Ok. Wait. That's not entirely correct. A recent team did claim to have targets for P90, P99. So we measured. But it wasn't systematic, nor global. None of the other web services (teams) bothered, so our effort didn't actually matter. And even then my team wasn't willing to sacrifice our sacred cows to consistently attain the P90, P99 targets.
It was a while loop with one extra zero at the end.
The loop with the bug run in twos second in the 286. Easy to notice.
In the Pentium it didn't run in the blink of an eye.
This way of benchmarking performance, with human wall clock time, makes performance problems add up: They add up faster, the faster your development machine is.
I guess a good benchmarck would be number of cycles run; but if the software runs fast enough it's hard to justify working more time on it unless there a business need to do it faster (like you're billed by milisecond, by intruction run like in a blockchain, or it is part of the core layer of your product and performance matters to capture market share).
I try to use fairly modern techniques and patterns in my development (but I am not yet satisfied that SwiftUI is up to the task for my more complex work).
It is my hope that this means that my apps will be as performant as possible.
I may get an M1 Mini, as a test device, sooner or later. There’s no hurry.
I am still planning on waiting for the M2 processors before upgrading most of my systems. By then, I think that most apps will have sorted themselves out.
All systems and OSes suffer the same faith eventually. That's why you don't use your machine from early 2000s with modern apps.
For me it seems that his statement shows some envy.
Well, I strongly disagree... and I'm sure I'm not the only one.
Imagine being at the restaurant ordering a pizza. There are only 2 pizzas in the menu: one with 1 topping, the other with 3 toppings. Each topping would take an extra minute in pizza's prep time. Which one would you pick? The one that is being delivered faster? Or the tastier one? I think for most of us the answer is obvious.
I take away from it, that there are opportunities in the fact that big-bloat will continue, and that the opportunities are in building fast and light software that performs exceptionally on what is considered low-range hardware of today, and incredibly on high-end hardware.
What is your takeaway?
It would be absolutely dastardly -- but could actually have the effect of forcing app developers to care about performance :) They won't care unless they have to. Web developers have to care about performance because of SEO (and click metrics...) but it only goes so far because it's not forced.
I disagree completely with the walled garden model of iOS (and the direction of macOS) but, if it nonetheless exists, I'd like to see them do something hardcore like this. The performance and battery gains would be out of this world.
Some things just take a lot of power to compute.
The issue I see is that it's kind of hard to measure whether the app needs this much CPU or if it's a bad design.
Aligning these incentives is obviously necessary. But it's not such an easy problem.
You'd have to start categorizing apps by how fast they should be (e.g. calendars should start in < 0.5 seconds and use at most 3% CPU on average). Then you may be able to align incentives this way. However then the problem becomes categorizing your apps and having useful categories for everything. Then maybe somebody has an idea for an AI calendar that needs more CPU, but is a lot more useful, because it can predict a host of events. Now they can't upload that to the app store.
Similar to the quote about Chrome in the article, speed came up quite a bit when Safari was developed almost a decade before Chrome.
> The number one goal for developing Safari was to create the fastest web browser on Mac OS X. When we were evaluating technologies over a year ago, KHTML and KJS stood out. [1]
> Don Melton: That's just perfect for me. In another life, I was a QA engineer. I run the tests, and if I detected we were slower, I closed the tree. That was the beginning of my policy, that policy that I pulled out of my hiney. Boy, talk about making yourself popular on your team doing that! [2] (on his no regressions policy)
[1] https://marc.info/?l=kfm-devel&m=104197092318639&w=2
[2] https://www.imore.com/debug-111-don-melton-blink-servo-and-m...
Chase is the worst. So slow I've missed credit card payments over it.
So, look into the offer of the largest bank in your country. It's most often the main bank in your country. If they promise to not bill you for the services you need, there is nothing to lose from switching to them.
If it was 32GB I’d buy.
But a fast CPU is only marginally useful when my machine grinds from memory swapping.