Test your product on a crappy laptop
css-tricks.com
css-tricks.com
- Those who don't care about performance, as long as it loads within a few seconds on their own beefed up system on the LAN. This article is for them, and we can only hope they will listen.
- Those who care about performance, and work for people who care. They are already doing great work (or are about to), producing those rare low-friction, high-speed, content-is-king sites which we all love.
- Those who care about performance, but work for people who don't. Since the developer doesn't get to decide what to work on, they can either get cracking on feature #357, work on performance on the sly at the risk of losing their job, or quit. Not much of a choice, really, unless you have some other-worldly lax schedule and minimal oversight. And don't forget, if you are allowed to work on performance the burden is on you to prove how much faster things are with your changes (which can be really hard to show conclusively) and that your N days is worth more than Bob working N days on that sexy ticket #357.
Substitute "security", "UX", or anything else you want for "performance", it works the same way.
https://en.wikipedia.org/wiki/Comparison_of_email_clients
2. Please consider avoiding Google (and Microsoft, Yahoo and Apple) as your email provider, due to their mass surveillance practices, both for commercial ad targeting and for US government political policing. There are several other reasonable webmail providers, if you really can't give up the web interface.
I use the mail client on iOS out of principle but still end up opening the gmail app when I actually need to find something.
A state actor will have less trouble breaking into a mail server I run, and I don’t really believe too much in the idea that other countries apart from the US are immune to police overreach.
Signed: someone who has multiple email addresses, has tried all the fancy alternatives (fastmail etc) and who desperately wants this stuff to work because having 3 web tabs to check email is annoying.
Only if they have a good reason to target you, personally.
But if we are talking about mass surveillance, attacking a large provider is incredibly *cheaper*: spend one million dollars on 0-days to gain access to one million mailboxes, or one billion to intercept submarine cables and backdoor CPUs and gain access to one billion mailboxes.
There is no way to attack somebody's personal, custom mailserver with a budget of $1.
I’m sure it’s something about my configurations but every time I mess around to figure it out it doesn’t work.
Generally my use of email is “look at stuff from right now” or “look at stuff from 6+ months ago”
(Here “wrong” means “does not find the email I am looking for”. Usually a failure mode of just not showing much of anything)
I would actually make the opposite statement, i.e. generally, webmail clients are significantly inferior to desktop clients in most respects: Feature set, responsiveness, flexibility etc. And of course, being potentially somewhat secure, as opposed to guaranteed no-security with webmail.
As for search functionality - I'm not sure you're right, but I'll grant you that some webmail providers, like Google, provide speedy search.
I have considered moving email accounts, but also don't have enough motivation for all that entails.
Well, Google has your email, to read and use and pass on, so I'm not quite sure what this "advanced protection" can mean.
I have 2FA required on regular logins for example, which can be a Yubikey or authenticator app token. At the same time, I have app passwords, used by my emacs-based email setup. Mu4e gives me instant search-based access to my saved email, and pretty good security elsewhere. Is that an option?
When I return back to my personal email using FastMail the difference is like night and day it loads fast and 99% of the time it works on the first try. I also occasionally use Outlook's webmail for work (as I work across different systems with some on Google and some on O365) and even Outlook webmail is generally faster than Gmail despite my main Outlook mailbox being much larger than my less-used Gmail mailboxes (although it is nowhere as fast as FastMail).
I remember the early days of Gmail -- it was a fantastic product in its heyday better than any other webmail client at the time. The quality has sadly dropped a huge amount especially in recent years to the point there are now viable alternatives. FastMail is one such alternative I have been very impressed with. Even Outlook's webmail is worth a look although the UX could do with some work.
I cannot understand all thr praise people give it, is it simply brand loyalty?
Everything about Gmail is very confusing to me; I have no love for Outlook (it's absolutely garbage) but in garbage rankings, Outlook is a bit more functional than Gmail is. Outlook has a more complete business eco-system vision I think than Gmail does, and there is a lot better integration with the other elements of Microsoft's ecosystem than Chrome has. For example, when I attach a Sharepoint/OneDrive doc to an email in Outlook, it offers to let me set the permissions for the recipients automatically. This doesn't make up for Sharepoint/OneDrive's awful permissions handling in general, but this element is convenient at least. (Again, I cannot stress how frustrating it is to even __see__ what permissions someone has for a Sharepoint/OneDrive document as regardless of your screen resolution/browser size, you're confined to a few centimeter width sized window, never mind that sometimes saving just outright refuses to work, and bulk-adding persons is even worse)
Gmail has awful design in many places; I don't like that a simple option like FWD is hidden behind the ... menu. I don't like that selecting an email from the list in gmail results in the menu buttons suddenly expanding. Even worse, the location of the reply button when the menu buttons are contracted is the same as the location of the "Mark as Spam" button when expanded; on browsers that aren't chrome, the display lag is enough that I can move my cursor far faster than the menu buttons expand and what __was__ the reply button location is now the "mark as spam" button location.
I don't like that it takes a good 5+ seconds to load the basic email list on a 100 Mbit connection. I don't like that logging into Gmail logs me into every other Google platform (e.g., YouTube) and I start getting spam about different channels or reminders to "engage" with various channels/social media. I don't like that I have to install a .dpkg for Mac to use Gchat video when other apps (e.g., Telegram, Skype, WhatsApp) are just a regular application that I can remove with drag/drop. I really don't like how "foreign" the Gmail/Google theming is with basically everything on MacOS and even on Android, or how few controls over basic UI functionality I get. (I really struggled to find in the Playstore how to monitor the progress of a download...)
Gmail and Google at large feels like an ecosystem that Google just expects everyone to buy into regardless of the platform/experience, and I truly cannot understand their intended way of handling the UI most of the time. The underlying methods of categorizing/indexing the information of course is fine, but actually interacting with it is frustrating for me compared to every Google product contemporary. As much as I dislike Outlook, I'd rather use it than Gmail. I'd rather use basically any chat program as opposed to GChat/Whatever it's called now (it's still really bad whatever the new product is called). Even Google itself I find myself fighting with Google's preferred results instead of what I'm actually wanting (without uBlock the first results are tons of ad spam that have nothing to do with the searches, and the first few results are usually some SEO'd result).
There is an "okay" experience with google if you go all in on it, but they certainly seem to bank on the idea that you'll do that in order to get access to Google results. The rest of the ecosystem is so clunky that it's really undesirable to use for me.
It is comical how long it takes to load on my internet connection. Has gotten better, but that is on my connection side.
My favorite crazy moment lately is just how long it takes to bring up the computer new window on a fresh page load.
It used to be great, mind. Not sure what I'm getting with the additional load times.
Moreover, when the developer in question demoed his work, the reaction from Brin (famously) was something akin to "there's 400msec delay, fix it". Which puts us clearly in the realm of the second scenario.
unless faang companies suddenly make it trendy again to care about low fidelity experience.
In addition it’s easy to forget until you learn a new technology that: first you learn how to solve a problem, then you learn all the ways to solve a problem, finally you learn how to best solve a problem.
This means that you need a good understanding to make performance focused solutions, it can simply be the case that most teams are learning to get there.
And the only Apple gear will be iPhones and iPads used by upper management.
Yes, I am also aware there are plenty of cases that aren't like that specially for the fortunate ones living on tier 1 EU countries.
That's not my experience at all. I would not make such a generalizations for Europe which includes very different cultures / work environments.
We can also start discussing formal logic regarding how to properly express generalization.
Running Windows 10 with an SSD and 8+ GB of RAM is a different story and way better experience.
The other side benefit is that Macs are way harder to manage and so IT depts don’t actually bother and you get admin access and told to turn on FileVault instead of the nightmare that is opinionated GPOs.
So when it comes to my option of a MacBook Pro or the cheapest functional Dell Latitude bought in bulk I’m gonna suddenly care a whole lot about testing in Safari.
Apple set themselves up really well as an escape hatch from overbearing IT, not surprised people with the opportunity take it. Devs get the treatments that was previously reserved only for the C suites.
Even filming your site loading on a normal-powered device or a mobile connection and showing them the video may be enough to change their opinions. But yeah, some people won't change, no matter what.
If stuff is legitimately slow, we should make it faster. Doesn’t need to be more complicated than that imo.
This has carried over quite well into my work life. Things like "big O", understanding the mechanics of different kinds of data structures, and their tradeoffs enter all my code. They don't really take up a large part of my active thinking, but I will routinely make decisions that are more performant and try to weigh in readability, "grok"-ability, and if they are common or not.
I find that university forced me to learn the unattractive bits of computing, that if I was self taught I likely would've glossed over and not spent several months on.
Yes, if stuff is legitimately slow, make it faster. But things typically _become slow_, it's a creep. As time progresses, it slows down, now it's slow and you may not have a product manager who thinks _now_ is the time to dedicated resources towards speeding it up.
This is HackerNews. Hating bloated websites is a time-honoured tradition here.
> Most web developers don't have a grasp of computer science or assembly, and act like computing resources are free
It's worth separating these two. Plenty of web developers have computer science degrees, but if they're paid to quickly churn out bloated websites, that's what they'll do.
> Nuance, knowledge, and metrics are what's needed.
If the aim is to improve the performance of software/websites, what's needed is a userbase that's less forgiving of bloat.
By my reckoning: everybody assumes that this article is for somebody else, and that's the problem. Assuming the problem is either developers who don't care or developers who don't have enough agency to act on it is easy because we can say "I care, and I have agency, so I'm not part of the problem."
Hanlon's razor applies here, but the related incompetence stems from competent people doing things outside their areas of expertise rather than being fundamentally incompetent. The developer discussion focusing almost exclusively on performance reinforces that. We favor our strongest mental models when reasoning about problems— when you're a hammer, everything looks like a nail.
But we often contribute to or create things outside our direct areas of expertise, (often reluctantly because we're the last people to touch the code before it hits production.) We might not even 'realize' how far outside they are, though. In my experience, this testing reveals far fewer performance problems than interface design and front-end implementation problems— i.e. touch targets are nearly impossible to use on burner smart phones, sidebars that clobber content or top menu bars that wrap between break points, weird behavior on non-widescreen landscape orientation devices, poor keyboard (and therefore screen reader) navigation, etc.
I believe this discussion illustrates the importance of thoughtful and skillfully-applied UX principles, where the data would ideally come from real users operating as they normally would... but maybe that's just the nail this particular hammer is hunting for! XD
I think the industry has a problem selling underpowered computers in general. AFAIK it's the non-pros that need the a reasonably powerful computer. Maybe "powerful" is the wrong word but not the crappy $300 windows laptop running on a celeron or whatever the latest.
My dad got some ~$500 HP all in one desktop and it's so underpowered as to be unusable. It takes 4-5 minutes to boot while and launching any app takes what feels like half a minute. Just typing you can feel the machine struggle. You could argue if all software (and the OS) was optimized it might not be underpowered but there is no world where all software is optimized.
It see a similar problem all the time with people giving up an old computer. My friend had some like 2007 Mac and she was thinking of giving it to a friend for their kids. Maybe some hacker kid would find a use for it but for most non-geeks, an old PC won't run current software, the current OS, current browsers with vulnerabilities fixed or modern standards. Zoom, youtube, etc are probably not going to be good experiences on such a machine.
Basically it's my opinion that non-techies should always get a relatively new and reasonably powered machine but sadly they don't have the knowledge to know that so they get led to a crappy underpowered machine and then have a crappy and frustrating experience using it.
I don't have a solution. It's only an observation. In my own family, when they let me buy them a machine, on a scale of 1 to 10 I aim for ~7 in terms of power with say 8-16gig of ram and a reasonably powered processor, at least an i5? not an i3 or N or Celeron.
> Because of the rise in injuries, British command considered going back to the drawing board with the helmet’s design. Fortunately, a statistician pointed out that the dramatic rise in hospital cases was because people were surviving injuries that previously would have killed them—before the introduction of steel the British Army used felt or leather as headwear material.
I've seen this same story except with warplanes during the War. Story goes that an allied air force tried to improve the percentage of planes that would return from a bombing raid, so they inspected returning planes, found the places where they had holes in them and added extra layers of steel to those areas for the next bomb run; but this had no improvement on the percentage of planes that returned.
That is until a "statistician" realized that all of the places on the plane that they found holes in were actually parts of the plane that could get hit and survive and return. They then started adding extra steel to the parts of the planes they found no holes or damage assuming that if those parts were hit the plane would get shot down and not return. After this change they started seeing a dramatic increase in the amount of planes returning from a raid.
Does anyone know the true source of these stories?
Regardless, it really opened my eyes to how changing your perspective on the cause of the problem can help find the best solution, and to this day I still think of this story when solving a problem.
(But yes, Abraham Wald is the statistician that the story is about.)
"My indignation at how the internet dealt with Wald's work was overblown. Stephen Stigler (son of George, and a statistician at the University of Chicago) called my attention to a note by W. Allen Wallis himself in which he mentions Wald's work explicitly in connection with survivorship bias. Wallis' original article in the Journal of the American Statistical Association was followed by two very brief comments and then by a further 'rejoinder' of a bit more than one page. Towards the end of it he says, "The military was inclined to provide protection for those parts that on returning planes showed the most hits. Wald assumed, on good evidence, that hits in combat were uniformly distributed over the planes. It follows that hits on the more vulnerable parts were less likely to be found on returning planes than hits on the less vulnerable parts, since planes receiving hits on the more vulnerable parts were less likely to return to provide data. From these premises, he devised methods for estimating vulnerability of various parts."
Amazing article btw. Thanks. This is what makes HN so unique.
Periodically I'd ask to shadow someone for a day or two. At some points, even asking if I could do their task and have them watch me to confirm I was doing it correctly.
What you would learn from this was amazing. All sorts of inefficiencies that people would quietly accept, because it was still way better than the previous state.
Then a week or two later I'd roll out the update, and get huge thank yous from accounting, or sales, or the warehouse because I completely trivialized some previous common task. What used to take 45 seconds now takes 2 because all the work is done for them 99.9% of the time and they just need to confirm it's correct (or correct the odd edge case). The computer became this increasingly magical tool they loved more and more.
So yes, find a user and shadow them.
This is highly likely to be grade A BS because it would be quite obvious to literally everyone flying an aircraft. It only make sense because the reader are not given a full minute to think about this.
once they sliced it geographically, they found that the increase was all in places like siberia where previously the site was unusable
Back in the 20th Century, I was on a team for a major web browser. They were attempting to extend web browser technologies to crawl and cache web sites. The idea was to enable complex web experiences in a time when Internet service was analog telephone, 9600 baud.
We worked for months on that. At the office. In Silicon Valley. On $6000 Compaq computers.
When I returned home via my two-hour commute, I would try it: dial up and crawl, overnight, and surf around on the train to work the next day.
I was the only person on the team to actually do this.
I could understand that; after a 12-hour day of intense times at the office, the last thing most of us wanted was more of it, as soon as we got home.
A year later, I was at an ad agency. Big clients, national brands. Everyone there used the very latest Macintosh machines. Those could be like $8000 each. Beautiful work in Photoshop, then stuffed into a web browser.
They had a room with a few PCs, but nobody went in there.
Also back then, Macs weren't so much a luxury like they are today (this is pre Jobs) -- they were just defacto standard in the creative fields. DTP and Photoshop were strictly better on the Mac up until about that point and it would be a number of years for PCs to erode the entrenched Apple dominance in that field. Much like UNIX workstations still had a lock on CAD/CAM/engineering in those days that was rapidly eroding to NT PCs. $8000 was the price for a well-equipped workstation whether it was Wintel, Apple, or UNIX (well a bit more for those). As alluded, the big issue with Internet publishing was taking into account a 56K dialup vs a corporate T1 rather than hardware differences.
It's that the teams were putting all this effort using quite literally millions of dollars of tech infrastructure, to create tech products to be delivered to very limited computers and slow networks.
And the real point: the end product was never seen on the target hardware by those building the things. No clue.
The web browser company assembled a usability lab, would get volunteer people to come in and try things out. But the feedback from that group was submitted as a report to a management group that was two layers above us.
Chain the coders and designers to $350 laptops, at least one day a week.
I used the same laptop and had very different experiences. Sites like the current HN worked much better at home. Large images didn't load fast there. Of course developers didn't create very large JPEGs or 10 MB JavaScript files back then but we had the same kind of problems, scaled down to smaller sizes.
The Auratones mimicking real world consumer equipment, ie mono, low bass and a rolloff at the top, had a revival because of that.
Another company offers speakers the correlate to the ones in TVs, for audio engineers in the movie industry. The body is made from the same material as TVs are and they have no parallel walls.
I once had to do some photoshop work on one such machine and it was nigh unusable because many details weren’t or were only barely visible. So while I wouldn’t recommend making a screen like that one’s primary screen, yes absolutely test on it periodically.
I also feel this re: dark and light modes, as somebody whose astigmatism makes dark mode LESS usable than light mode. I get it, dark mode is awesome for most people. Please don't make it mandatory.
It's often on the marketing and exec teams. I had to be very firm in some of our UX decisions because yes, it does look a little less polished this way, but a lot of our audience is elderly and they need to be able to read what we're giving them.
And this isn't even getting into how many sites break if you have any accessibility shortcuts or defaults set up on your browser. I'm slightly visually impaired and have pages set to load at 150% zoom (on a 4k monitor) and a minimum font size of 12. It's absurd how many sites that breaks.
You will need to change the minds of PMs.
There is so much design/development guidance around screen width, breakpoints, contrast ratio, accessibility and so forth, but so little around "real world" testing on low-tier devices. Every designer is using a 5K display with perfect color and definition, or an iMac with a super fast processor and tons of memory; our users are not.
On windows I used clumsy that was much more realistic. On some tablets, I used my microwave oven or my feets to walk away from the Wi-Fi.
2 rules:
- Always indicate that your application is performing a network action (like showing a spinner, disable forms/buttons while submitting, etc)
- Always catch errors (including timeouts) and give some form of feedback to the user when something went wrong.
Try letting your local development backend return a 500, timeout or a 4xx error every now and then, and check if your frontend handles this in a graceful manner. It should at least give some feedback to the user that the operation failed.
You can emulate a slow internet connection in chrome devtools, though I find the experience not accurate. You can also just add a sleep() call somewhere in your local backend. Maybe inject a sleep() into your acceptance environment, and let the test team work through the scenarios with that sleep() call in place.
I've seen so many frontends that don't catch errors, and just show the spinner indefinitely. Or worse, show nothing at all. This is extremely confusing to less technical people.
The worst offender I hit regularly is Google Meet. I use ADSL most of the day because it works just fine for most I do. Which is either local or ssh or looking up technical resources on the net. Even Google Meet works fine (I don't use a cam). Until I share my screen, which contains nothing but text in full screen. Then Google Meet will forever freeze the shared picture after a couple of minutes without anybody telling so. It's ridiculous that they cannot handle this reasonably, you don't need 30 fps to share a screen of slowly changing text. It's completely user hostile that there is no message for either the sharer or any participant that sharing has frozen and will never recover. This is paid usage of Google Meet.
Meet = glitchy low-res videos, freezing screen sharing, etc even on high quality fibre connections Zoom = smooth high-res video and generally usable screen sharing (with minor glitches that usually sorts itself out in seconds) even on low quality connections
The difference is like night and day, no joke...
Well, sharing terminals over telcos is backwards anyway. We did that 20 years ago over 56 kbit/s modem lines using VNC. And the compression was lossless, the result pixel perfect.
But forcing managers to use a slow network would be an effective way to get them to prioritize performance. If using a slow network is a choice, they wouldn't.
Almost a decades back I talked a game dev, asking him why the game that they released demands such high hardware requirements. The two reasons that he offered was: 1) It costs money to produce & maintain content such as Level of Detail assets to enable support for low end devices, and 2) People cannot afford good computer usually also cannot afford to pay for the game.
I think it's also somewhat fitting in this case: the industry only focuses on making money out of the people who can or potentially can afford the service, and left out those who can't. The user-end requirement is just an implicit barrier that allows companies to generate rainbow farts.
No, I'm not criticizing those companies that actually employed such dark patterns. After all, everyone wants money. However, these kind of practice can be costly as well in the form of 1) bad UX for paying users, and 2) higher cost of bandwidth (for both the user and the company).
And this is game development, the industry famous for over-scoping everything because it's a winner take all economy. Followed by death-marches to implement said over-scopes.
Doing anything special for quartile 1 of the standard distribution goes out the window.
Realistically I just think this pattern is true of every domain.
95% of software is made up of throwaway prototypes, where thoroughly thought out engineering isn't necessary because the business case demands minimum viable product for very good reasons.
(Btw, i developed medical dicom viewer for large CT and MRI data, on a 10yrs old dell Laptop. The viewer was always fast on customer machines. If it would not work on my machine, i tunded the Software until it does ;) )
If there had been ways to buy games online + digital downloads, I would genuinely have feared for my parents' pocketbooks.
It’s not really comparable because there wasn’t the ubiquity or range of compute power there is now. Modern games tend to nestle at the top of it as the parent comment suggests. There is a whole market of people that want to play games that have bad hardware. And my point is that there was a sea change about a decade ago in that respect that the wider industry is only just catching up to.
Anyway, without numbers that's just a theory and might not hold. Anecdotally a lot of people are worrying about whether they can play games on their budget build. And they would rather buy games than spend a ton on a faster PC. And I believe consoles sell for a similar reason: they are cheap. It's the actual games that console gamers pay decent money for.
(Of course the PC game market is now extremely saturated and there are deep discounts & giveaways constantly somewhere)
I wonder if they had any kind of proof of this. I would think that there are plenty of kids who could get their parents to pay five bucks for the game, but not 500 bucks to buy a fancy new computer.
It is and was a regression from the previous design which was fast even on 3G connections.
It's driven by Google engineers running their bloatware on i9 MBPs with 64gb of RAM. Oh Gmail is slow? Have you tried not being poor?
Thank you.
Sincerely,
Craptop user
All work I do is tested on crappy low-powered computer because that is what I use to do work. If it is not fast on these underpowered computers, then it is not usable (for me). That means on anything better than a craptop, generally, performance can only improve. Similar principle applies with shell scripts. I prefer to use the ("crappy") scripting shell as the interactive shell. That means scripts generally run fast under all conditions and I never have to worry about scripts not working due to use of interactive shell, e.g., Bash, features.
Target the lowest common denominator. That's how I work. No overpowereed workstation with multiple monitors, or expensive "developer" laptop.
Every web dev should use one.
I am fascinated by the low end options, you learn a lot about a system when it's pushed to its limits. Or maybe you learn even more about your pain threshold...
I've heard it said that it's more difficult to make a $10,000 car than it is to make a $1,000,000 car. I don't recall the source, via Horace Dedieu maybe.
My first job out of college was at a spaceship company. One of the most senior engineers told me of the footrest he had designed for early 747 airliners. First Class. He considered it his greatest work.
That foot stool was quite literally more difficult than rocket science.
I find the bias towards powerful desktops as the only place any apps are written and tested ridiculous and something we can work to correct long term with progressive web.
It is, but probably for a different reason than you'd think. In automotive, the difficulty is not designing the car, but the facility to mass produce them. Elon found out the hard way. In his words: "it's trivial to design the machine, but it's hard to design the machine, that builds the machine". He is currently facing the same challenge with the production of the raptor engines for starship.
A million dollar low volume "hand made" car can be build by a small team, with relatively few resources. Operating a factory that produces thousands of affordable cars per day takes tens of thousands of people through the entire supply chain.
both of these products have surprisingly high specification, and producing hundreds of thousands of them each day is a serious challenge.
Every time I went in there and used an old, slow phone it reminded me to consider the person using that device for real. It's so easy to forget when you're working on your giant monitor with a super fast computer and a high end phone in your pocket.
Simply head to Devtools > Performance tab > Gear icon > CPU > 6x slowdown.
That isn't a perfect representation of an old laptop (doesn't throttle GPU operations or trigger low memory behaviours), but it's a good start. As a bonus, it makes your fans spin up wildly whenever loading a page!
Things like react are purely extra knowledge needed over the top of the basic website building blocks.
But in my experience 80% react developers could not layout a page with raw css. I am not even talking anything "fancy" like transitions or animations. They just import libs and frameworks and customize a bit.
I mean that isn't acceptable to me either.
The funny thing is, most of the time those websites have no complex requirements, it's mostly news site with things likes a covid map embed, but the map has a resolution to the meter for country boundaries... A few KB image that open the interactive map on click would work just the same.
And for website with heavier requirements (web app), there are two camps, those which are excellent (like onshape, that thing is amazing, or draw.io) or painfully slow to the point I had to ditch them (notion, clickup).
I have a feeling that many of those laggy website could do some key optimization to make everything order of magnitude faster/lighter.
To be honest, this feels like the author never used "craptop". WSL even with quad-core hasewell laptop and 8GB is pushing it. It's better to RDP / develop on one machine and run on another.
Having said that, It's important to test on low speced always. Even not for website (we test our cpp code on some 2009 machines)
Windows Updates are drip fed out to classes of machine so they can limit the damage when they hit a class that inevitably fails because it was never tested before rolling out to production on that hardware.
I appreciate they can never test every configuration but based on what they used to do it's clear they identified a need for this kind of testing in the past so what's changed? Why don't they need to do this testing anymore? Why make your users do it for you, for free, no less.
I think you answered your own question.
And in the end, it ran -- just about -- on those specs.
Your user base greatly influences what kind of performance optimization you should be doing. In some cases it’s worth it, but if your primary user has a fast machine, it’s generally not worth it. Reminds me of the time when I had a project manager who insisted on optimizing page load time for a heavy mapping application.
And if your app is a simple shopping cart or a few forms, you probably don’t need a JavaScript frontend framework. I can’t tell you how many times I’ve removed all the unnecessary React and Vue and increased performance by at least an order of magnitude.
Most things are painful on one of those. Be the exception
Many years ago I had a fascinating incident with a client. We were building a custom skin for our product for them, and they had quite a striking brand identity that we tried to match. When we showed them what we had built they complained that it was illegible.
Eventually, after visiting their office, we found that they were all working on cheap Windows laptops attached to horribly configured monitors - and our site really was illegible. We had done our design work on an iMac!
his reasoning about network usability were always useful, especially considering jitter and latency.
also, it is surprising how usuable some internet connectivity is compared to none at all. having a shitty ADSL based setup is far better then no internet at all.
Suddenly things like transport or at rest encryption are no longer perceived to be free but really limit your performance.
First time I actually had to be concious about choosing appropriate ciphers and hashing algos and not just using defaults.
Also, I'm very curious what SoC this was.
The biggest issue I had was with zfs native encryption using aes256-gcm per default.
The SoC has AES support but with gcm the hashing function is not AES based, so i had to change to aes256-ccm to profit from the AES support.
For sshd i severly limit available hmac and cipher to use chacha20 but i also force that in the client side.
I will post the relevant lines tomorrow.
Wireguard is also costing much more CPU performance then I am used to.
My brother bought a premium Lenovo laptop. He's not very computer literate (he's a lawyer).
I cautioned him to run "Add / Remove" programs and remove the McAffee trial and turn on the built-in Windows virus scanner. I told him I'd talk him through it. Of course he didn't.
A year later when I visited him (we live on opposite ends of the country / world depending on the time of year) I saw that he simply uses his computer with giant red warning popping up all the time from McAffee "WARNING YOUR COMPUTER MAY BE UNPROTECTED" and a link to buy McAffee.
I managed to find a crappy laptop to do some testing and work on optimizations, and it wasn't pretty. No development tool would work on it. My recommendation is thus: aim low, but not the lowest. You'll still be able to measure impact of your changes, and you'll be able to collect some data and other measurements about what is slow.
I have gigabit internet and powerful desktop, with enough ram... But still they don't develop for my 1440p screen, but some crappy tablets...
I've worked with machines so underpowered you can notice execution time difference between minified and non-minified code. And where CSS animations are considerably slower than GIFs. Oh yeah.
Right now I am with people who are pretty good at architecture but kind of suck at the pieces that power their designs. It's an ego problem. Big one at that
I had plans with 35GB of transfer and the modern web meant I was having to restart my plan every single week. Some of us live in Internet deserts where there is no hope of getting a wired connection (downtown Chicago in my case).
As a business having to create ideal scenarios is difficult. Mostly, I would focus on my major target audience which pays me the most and add the optimization to roadmap when I want to experiment and test the said market for my product/service. Running a business is complicated as is.
For SaaS businesses focussing on tech companies wouldn't be an issue. Example, using Figma requires a good machine a score on Speedometer of 80 should suffice as we go below than that things aren't so great. But mostly tech companies using Figma would have a good machine. Yes, there would be an accessibility issue for new comers and college goers who cannot use Figma due to a crappy laptop but even small businesses in services like myself help them buy a new laptop for work.
The screen size can also have an impact. Developers rarely use 1366x768 monitors, or even low DPI displays.
There's also internet speed. Wired internet is fast, but people use your website on crappy hotel wifi, or in the underground.
That way I don't have to worry about missing any performance beat!
Since energy prices are guaranteed to increase forever, I'm surprised this is not default behaviour.
Surprisingly true. I've seen quite a few fairly wealthy people use some janky Android phones. Their reasons to use them can be best summarized as personal preferences, but the fact remains.
The slowest device we test with is actually a very expensive Chromebook with severe thermal throttling issues. Using our WebGL app that runs fine on a low-end Chromebook tablet will bring this expensive Chromebook to its knees within minutes. It throttles down to like 600 MHz or something.
The worst part is that every tech reviewer seems to have one of these things in a drawer somewhere that they pull out for testing. The usual duty pattern of Chromebooks is very bursty, e.g. page loads, but sustained GPU usage just crushes this particular device.
I don't recommend garage sales, however. People tend to overvalue their electronics. I tried to buy a radio that was worth maybe $20 from some guy. He wouldn't part with it for less than $150 because it reminded him of his father. That's nice, but I'm not paying $130 for your memories.
Remember the low res 1366x768 screen.
The low... um. One of us is in a bubble. I'm typing this on a laptop with a 1280x800 screen and it's perfectly fine. Like, not super spacious but I code and browse the web on this box and I don't have any problems. (To be clear, it might well be me in the bubble; this laptop is over a decade old)
The point is to feel the pain. By any modern sensibility both resolutions are pretty awful, and experiencing it on a $200 consumer laptop is icing On the cake. Although I have clients who routinely test applications on ancient 800x600 displays due to legacy constraints.
Keep in mind that hardware improves roughly on line with Moore's Law. The gradation from low-end to mid-market might only be a few years of development.
The 10-year-old system is probably going to be much worse than a current low-end buy.
Moore’s law hasn’t been kind to x86 laptops, and the tricks used to speed things up are missing from low end celeron processors and binned SSDs. The cheap hardware and poor touchpads add to the charm.
I would bet that the 10 year old Lenovo would be surprisingly better than the shitty 2021 device.
There's been SSDs, increased cache, increased memory speed, and more cores.
You might want to go back a bit more than 10 years, but yes, even a reasonably high-grade older system in my experience really dogs out on the current Web.
My software engineer teammates get specially approved 4K displays and “engineering” laptops. People who use the apps are often restricted to “business” laptops. Conference rooms still use old projectors that are even lower resolution. We have no control over the displays our customers use.
I’ve been teaching my engineers to use the responsive design tools in their browsers. For UI components that render differently based on @media queries, it’s been helpful to add stories for those breakpoints to our Storybook component library.
When recording a demo video, try to record at a lower resolution like 720p to save bandwidth and make it easier for people with small screens to watch.
I suggest doing the final test of your your site on:
* A friends old laptop, on their wifi, still logged in as them, and with them clicking the buttons with you watching over their shoulder.
* The same, but a friends old android phone, preferably with 'samsung browser'.
It's something like 13 years old, and ~$60.
It can run almost every website that hasn't been web-dev'ed into oblivion.
It balks at anything with memory leaks and inefficient CPU/GPU load.
It can run YouTube/Facebook/Twitter (surprisingly, for the last).
It can't run https://github.com/
It… what? I don’t know about Facebook, but GitHub is a good deal lighter than YouTube and Twitter. GitHub is one of the extremely few websites developed by a large number of people that aren’t atrociously resource-heavy and JavaScript-dependent.
It cannot run it at all, because of all the graphics nonsense going on.
> In Windows 10, Acer laptops have a huge CPU time working because it struggles to keep up with the main OS.
My coleague has an Acer laptop with i9 processor, RTX 3080 and 64GB RAM running on Raid NVMEs. It's screamingly fast.
CPU cores and available memory can be limited via a VM. CPU frequency, and disk speeds can't. 5200RPM disk vs SSD/NVME is a HUGE difference. If it's swapping often on a 5200RPM, that's a significant slowdown.
There is something very pleasing about everything running smoothly without any hiccups.
I don't like the attitude calling them craptops. A Gigabyte of memory and 10 Mbit/sec are enough to meet 99.9% of the user needs for Web browsing. If sites were implemented in a resource-aware manner of course.
Instead of looking down at craptops I would look down at people introducing 4K and using many Gigabytes of memory for personal computing. Even worse making masses use it. It's irresponsible greed and short-sighted capitalism that ruins the planet.
The devs need that just for Slack sadly.
On Linux, (besides GPU) you'd set /sys/devices/system/cpu/cpu$i/cpufreq/scaling_max_freq to cpuinfo_min_freq, for all $i. I always look for minimum (idling) CPU frequency in devices before buying them, but this info is almost never available. My laptop has a min freq of 800 MHz, but I would like to go even lower, to better test low performance devices and limit energy usage. In web dev, you can simply use chrome dev tools cpu throttling though
While the cgroup approach is (like cpufreq) doable by poking around in /sys/fs/cgroup (you mkdir new directories to create cgroups), cgroup-tools makes it a tad more straightforward by making the steps less verbose. (Besides cgroup-tools, "unshare" and "nsenter" ship with util-linux and can issue the syscalls necessary to start a process in a given cgroup, which you can't do with pure bash.)
The setup is always the same - you create a new "cpu" cgroup (here named "cpulimit"), then configure CFS (completely fair scheduler, I think? I thought there were multiple schedulers... maybe this only applies if using CFS? I think CFS is the default everywhere) with a period and quota. I think the period is used to derive an internal tick rate. The quota is a fraction of the period and the ratio (yay you get to do the math yourself) represents how much CPU the task gets to eat. I think the ratio applies across all the CPUs. I have no idea what happens if you bring PID-level CPU affinity into the equation. Maybe you can select which CPUs are enabled for the cgroup, and the math applies to whatever's enabled. Haven't answered any of that yet. In any case:
# cgcreate -g cpu:cpulimit
# cgset -r cpu.cfs_period_us=1000000 cpulimit
# cgset -r cpu.cfs_quota_us=100 cpulimit
A fairly straightforward demonstration: in one terminal run # cgexec -g cpu:cpulimit yes | pv -l > /dev/null
while in another terminal rerun the last `cgset` with quotas of 1000, 10000, etc, and watch the output rate go up and down. (In this case 100 is a good starting value, but anything more complicated than printf(); in a loop will probably finish launching in 2023 if started with a quota of 100.)The nice thing is that the cgroup happily sits in the background until explicitly deleted (and systemd leaves everything it didn't create alone) and you can just poke at its values anytime. Network cgroups can probably do interesting fun things to traffic as well (oh yeah, network namespaces = discrete iptables/nftables per namespace).
Lastly, the cooling_deviceN entries are in /sys/class/thermal, and have cur_state and max_state. YMMV; setting cur_ to max_ may well take several minutes to undo (very much the case on older systems at least) - maybe try that on a throwaway-able session. :D (Think "Task Manager (Not Responding)"...)
When I tried your commands, on Arch via libcgroup-git, `cgcreate -g cpu:cpulimit` only results in `cgcreate: can't create cgroup cpulimit: Cgroup, requested group parameter does not exist`, for some reason. But this is not a support ticket, I have not researched this at all yet. But cgroups only limit some processes anyway, never the entire core(s) - so it seems one could also simply use cpulimit [1] instead which emulates by sending SIGSTOP and SIGCONT.
About cooling_deviceN: While this does limit cpu functionality, this seems to only also set `scaling_max_freq` to an appropriate value, throttling because the fans are disabled. Not more useful than setting the frequency manually I presume.
A bit of cursory googling around for that error didn't find anything particularly insightful, surprisingly. Most of the references were extremely obscure.
The only consistent theme I saw was "cgroups is not loaded or broken", but that doesn't make sense: systemd depends on cgroups, IIUC. And cgroups itself was introduced in the 2.6.x era. Honestly the only idea I can think of is asking on unix.stackexchange.com or #archlinux on irc.libera.chat.
I'm curious what syscall failures `strace -o cgcreate.txt -s999 -v -f cgcreate -g cpu:cpulimit` might reveal.
I'm also very interested to know whatever the root cause ends up being!
TIL that the cooling_deviceN trick does that on some systems. On the boxes I have here it basically slows everything to a crawllllll, especially if turned up to 11.
I've always looked at `cpulimit` as somewhat of an awkward hack. Yes, it works, but it's like bit-banging vs hardware I/O, or CPU vs GPU, or rapid polling instead of push/async. I kind of squint plaintively at it a bit. If it was all I had in an 11th hour situation then sure, but if I was deploying something to production I wanted to forget about? Eeeeeehh....
I learnt it from my colleagues, they are the engineers
This attitude seems common, that websites are just going to be fat and get fatter. That's a lie.
Not if you, as a web developer, stop the bloat. The power is in your hands, you just need to use it.
No, you don't need that 8 MB hero image. No, you don't need that bloated framework. No, you don't need those 37 tracking libraries. No, you don't need a "Read More" button hiding most of the content. No, you don't need dynamically loaded clickbait at the bottom of the page. No, you don't need an autoplaying video. No, you don't need load a script to inject text into a copy operation. No, you don't need 87 cookies. No you don't need to load random unvetted code from a third party advertiser. No, you don't need the page text to fade in on scroll. No, you don't need any of that.
In case you forgot, https://idlewords.com/talks/website_obesity.htm
Explaining them how much worse the bloat makes the site's experience for the user, showing how many pages are left partially loaded because the user did not have the patience and navigated away, how the competitor's site loads faster, may help convince them to keep the experience reasonably slim.
Asking for web sites that don't have 27 trackers, enormous hero images, a full copy of framework of the week, etc. is like asking for native games under Linux: the money isn't there to justify the added hassle and support costs.
The only thing I take a stand on is when the product is actively harmful and immoral. Just being shit or slow is not my problem.
Users of the features we develop are the ones that produce bad websites.
As a dev, I want to use tree shaking to make my bundles small and optimize to make my website lighthouse score 100 across the board.
What happens? Marketing needs tag manager installed and then proceeds to async load 50 tracking scripts in the background.
Design wants the large hero images because on the high Res devices they use it looks slightly pixelated and when you push back, a quick screenshot to the PM will guarantee the ticket is added to the backlog.
Point being I'm not sure claiming that Devs hold the power is particularly constructive as there is a large portion on non-techies who have their own priorities to push.
When I say these folks get upset over slight pixelization, I'm not even talking about pixelization where everyone can tell it's a low quality image. I'm talking about situations where people are upset they can't read an iPhone screen someone is holding in the background when they are viewing it on their 4K display (note: that particular phone isn't the focal point of the shot, nor does it have anything to add to it; it's just someone staged back there to make the shot feel more alive, mind you!).
It's disheartening because I do want to deliver the best experience possible and try to do everything in my power to accomplish it, but sometimes I lose out and folks force their megabyte imagery.
There’s also mystery JS that slows down everything and breaks random parts of our app - that’s your Chrome extensions :)
Poor people are frequently low LTV customers unless you’re getting paid by someone else (say the government) and even in that case you only have to please the buyer not the user.
So maybe if I was building like payday loans or something.
Additionally, apps designed to be used in the field by top-tier customers often fail basic requirements. (Funny how many apps and sites fall apart on my iPhone 12 Pro in places where the connection drops down to LTE)
See: https://news.ycombinator.com/item?id=27410503
I'm not a fan of this, mind. Just aware that it's a possibility. And you're giving voice to that as a deliberate choice.
I do care about crappy network and load times. But there's some laptop that have worse performances than three years old tablets, and there seems to be no end to what scummy companies sell at low end.
At some point down the crappy pit, there's a line where it's no longer my problem.
I mean, I know a guy who recently got into frontend development with react. I did the backend for an app he was building. I had to explain him what an XMLHttpRequest is so he could send me one. It just blows my mind that there are people who legit write code with some framework but don't know the basics of the language they're writing in and/or the platform the whole thing runs on.
I can use websites to videoconferencing. Streaming considered video and audio comes with non trivial loads.
I can use websites to compress images, to compute tabulated data on various Excel clones, remotely control devices or play games.
This isn't 1995 and we're way past indulging user lazy choices which have us a decade of internet explorer nightmares. Web is much more than that, and one need to know where to draw the line where their products minimum requirement lies.
> I can use websites to compress images, to compute tabulated data on various Excel clones, remotely control devices or play games.
You sure can, but you probably shouldn't. These use cases are much better served by native apps. Shoehorning hypertext documents with macros into being applications will never come close to writing proper applications, in terms of both UX and performance.
I really wish we would undo many of the "advancements" of the web technology. This scope creep needs to stop, yesterday.
I wish there to be an answer to a simple question: when is a web browser finished?
you say you do, but you don't.
There's an argument for rampant consumption as a toxic buying pattern. If we are upgrading our systems just to use bloated webpages - webpages that offer nothing of substance over webpages circa 20 years ago, then it is worth asking what we are really gaining.
In any transaction it is important to distinguish between what is being sold, what is actually delivered and the utility provided.