by yomlica8 · 3y ago · 0 comments
I was watching Halt and Catch Fire and in the first season the engineering team makes a great effort to meet something called the "Doherty Threshold" to keep the responsiveness of the machine so the user doesn't get frustrated and lose interest. I guess that is lost to time!
Old days: Cmd + f, type what you want.
New days: first scroll to the end of the page so that all the contents are actually loaded. Cmd + f, type what you want.
Is just a list of dishes, some with small thumbnails, some without any images at all. If you can't load a page with 30 dishes fast enough, you have a serious problem (you could always lazily load the thumbnails if you want to cheat).
Actually much worse as Microsoft once did with their COM model, ActiveX based on MFC foundation classes with C++ templates, etc.
And to build those interactive programs somebody is trained to use React, Vue, etc. using their own eco systems of tools. This is operated by a stack of build tools, a stack of distribution tools, kubernetes for hosting and AWS for managing that whole damn thing.
Oh - and do not talk even about Dependency Management, Monitoring, Microservices, Authorization and so on...
But I really wonder - what would be more complex?
Building interactive programs based on HTML or Logo (if anybody does remember)?
As much as I hated developing with COM, the application interoperability and OLE automation is a form 90s tech utopianism that I miss.
Except...there's no model of precisely how text is handled or how to re-encode it for e.g. screen reading...the development model lacks the abstraction to do layout...and so on. So we added a longer pipeline with more things to configure, over and over.
But - the computing environment is also different now. We can say, "aha, but OCR exists, GPT exists" and pursue a completely different way of presenting many of those features, where you leverage a higher grade of computing power to make the architectural line between the presentation layer and the database extremely short and weighted towards "user in control of their data and presentation". That still takes engineering and design, but the order of magnitude goes down, allowing complexity to bottleneck elsewhere.
That's the kind of conceptual leap computing has made a few times over history - at first the idea of having the computer itself compile your program from a textual form to machine instructions ("auto-coding") was novel and complex. Nowadays we expect our compilers to make coffee for us.
> Building interactive programs based on HTML or Logo (if anybody does remember)?
Hold my beer: my Github Actions CI scripts use Logo to generate the bash build scripts as images that are then OCRed and executed by a special terminal that exploits the Turing complete nature of Typescript's type system.
Turtles all the way down!
Only to discover that 2/3 of the matches are invisible text that's put there for $deity knows what reason, and the rest only gives you the subset of what you want, as the UI truncates the list of ingredients/toppings and you need to click or hover over it to see it in full.
As a bonus, in Firefox if you hit the ' key (apostrophe) you get a search that looks only within hyperlinks and ignores all the un-clickable plain text. Give it a try, sometimes it can be very useful
That depends on your scale. If your product is "large enough" it is relatively easy to get into the range of several seconds of response time.
Here are some of the steps you may want to execute before responding a resquest to your user:
- Get all the dishes that have the filters the user selected
- Remove all dishes from restaurants that doen't delivery in the user location
- Remove all dishes from restaurants that aren't open right now
- Get all discount campaigns for the user and apply its effects for every dish
- Reorder the dish list based on the history of the user interactions
Now imagine that for every step in this list you have, at least, a single team of developers. Add some legacy requirements and a little bit of tech debt... That's it, now you have the perfect stage for a request that takes 5-10 seconds.
I mean maybe your DB is a single node running on a potato and your load's very high but you're also somehow never hitting cache, but otherwise... no, there's no good reason for that to be slow.
[EDIT] Your last paragraph is the reason, though: it's made extremely poorly. That'll do it.
But it was different...
Yeah. It was. That's exactly my point.
A major problem is the number of places in our code stacks where developers think it's perfectly normal for things to take 50ms or 500ms that aren't. I am not a performance maniac but I'm always keeping a mental budget in my head for how long things should take, and if something that should be 50us takes 50ms I generally at some point dig in and figure out why. If you don't even realize that something should be snappy you'll never dig into why your accidentally quadratic code is as slow as it is.
Another one I think is ever-increasingly to blame is the much celebrated PHP-esque "fully isolated page", where a given request is generated and then everything is thrown away. It was always a performance disaster, but when you go from 1 request to dozens for the simplest page render it becomes extra catastrophic. A lot of my web sites are a lot faster than my fellow developers expect simply because I reject that as a model for page generation. Things are a lot faster if you're only serving what was actually requested and not starting everything up from scratch.
Relatedly, developers really underestimate precomputation, which is very relevant to your point. Your hypothetical page layout is slow because you waited until the user actually clicked "menu" to start generating all that. Why did you do that? You should have computed that all at login time and have it stored right at your fingertips, because it is a reasonable assumption given the sort of page you're talking about that if the user logged in, they are there to make an order, not to look at their credit card settings. Even if it expensive for reasons out of your control (location API, for instance) if you already did the work you can serve the user instantly.
Having precomputed all this data, you might as well shove it all down to the client and let them manipulate it there with zero further network requests. A menu is a trivial amount of information.
It isn't even like precomputation is hard. It's the same code, just running at a different time.
"But what about when that doesn't work?" Well, you do something else. You've got a huge list of options. I haven't even scratched the surface. This isn't a treatise on how to speed up every conceivable website, this is a cri de coeur to stop making excuses for not even trying, and just try a little.
And it is SO MUCH FUN. Those of you who don't try you have no idea what you are missing out on. It is completely normal on a code base no one has ever profiled before to find a 50ms process and improve it to 50us with just a handful of lines tweaked. It is completely normal to examine a DB query taking 3 seconds and find that with a single ALTER TABLE ADD INDEX cut that down to 2us. This is the most fun I have at work. Give it a try. It's addictive!
For me, I use google so often that I can rapidly parse information without really needing to read much of the text, the link just sort of 'looks' right. I've observed my wife reading google results and she is much slower and more methodical, probably because she doesn't google things 20+ times a day every day like I do.
That's how I end up misclicking, because i'm not working at the speed of a normal googler.
It is really annoying though, there are some css tweaks you can make using browser extensions to make that disappear if you're so inclined.
But the real solution is better web page design.
A horrific piece of UI/UX/engineering/whatever.
Which, in my mind, means it didn't load instantly. The page isn't loaded until all of the data is displayed.
I don't disagree with your example, but optimising for page load time is as old as the graphical Web.
Not at all what I expected from a news site. They're usually full of crap and dog slow.
This is the specific URL I experienced this with. Though the whole site seems mostly very quick. https://www.bbc.com/news/live/world-us-canada-65967464
And this is on a 2017 MBP, which some sites are really slow. Nothing crazy like the new silicon CPUs here either.
Then head to the Newswaffle link and input https://bbc.com or just scroll down the page to head to the converted site.
Ruby on Rails may not be the poster child for speediness as things get big or complex, but if you aren't fighting the ORM, it's consistently quick from click to data.
Also, RoR is definitely not dead.
If you activate the start menu with a keypress it's going to grab focus. Before it grabs focus the previous window in focus will get events. The same applies with panels (drawers? I forget Windows' name for them) in the Start Menu. There's a non-zero time between activation and grabbing focus to receive keypress events.
Everything from animation delays to stupid enumeration bugs can affect a windows not grabbing focus to receive keypress events. Scripting a UI always has challenges with timing like this.
A mainframe terminal has a single input context. You can fire off a bunch of events quickly because there's no real opportunity for another process (on that terminal) to grab focus and receive those events.
Note the above doesn't absolve Windows of any stupid performance/UX problems with bad animation timings and general shittiness. Microsoft has been focusing on delivering ads and returning telemetry with Windows instead of fixing UX and performance issues.
What’s Microsoft’s excuse? Tired of their incompetence being handwaved and a several decades old jank non-solution being held up as acceptable. MS needs more accountability in their teams.
but putting delay between events (not keystrokes) is nevertheless a good practice
Then again, I guess any other OS might break in same way. Like my Debian VM just kinda stops responding to part of the screen sometimes if programs are maximised...
Office suites have never been good, but office suites in like 2005 seemed to stretch systems to the breaking point.
Lots of consumer software has always sucked out of the box, I guess if you are here you were possibly a technically savvy kid at some point, is it possible that you were just more selective about the types of programs you ran when you were using the computer for fun?
I still have this instinctual reluctance to change screen resolution in a game's setting screen, even though 99% of the time it's an instantaneous thing these days.
This is not an inherent limitation of CPUs but a part of Windows' exclusive fullscreen concept. Just another thing that was simply accepted as the way things are instead of being improved (until exclusive fullscreen went out of style).
If you get bad performance in a game nowadays it's a good idea to try proper fullscreen. Alt tabbing might be slow, but the game will run better.
I have fond memories of that, but basically the editor was a UI into a linked list with a blue screen. So not comparable to what people are being asked to do with Word and 365 today.
My personal beef with Word is that it struggles so much with long documents. Trying to read, say, a 300 page spec from 3GPP is miserable.
Unfortunately I cannot think of a single thing that has gotten better about Spotify since I started using it, and a lot which has gotten worse.
There is speed, then there is the perception of speed. Crystal got this right.
The only exceptions are: 1) the actual build, which is faster on the modern machine, but only for a large number of source files and 2) reading and writing files - a floppy disk cannot beat an nvme drive of course.
I have a 2015 MacBook Air I abandoned recently for being so painfully slow to use that I had almost not touched it for months. I have an iPad Air 2 that is basically unusable at this point. Both are 2-3 orders of magnitudes faster than those old computers that work instantly.
But windows and web apps are super slow now too
Think of all the landfills and wasted work hours earning the money needed to fill those landfills. The heavy and rare metals
This is proof that if computers were 10x faster, they would run slower than ours today, because in the past we’ve seen that be true over and over. The software companies will just make heavier and heavier programs and operating systems until we have gained nothing but a significant amount of co2 emissions
Give it some time for the industry to finally mature.
What really drives me mad is the latency of some file selection dialogs for example which can take like 10 seconds.
Another one that can be slow with file dialogs is that sometimes (maybe it has been fixed now) it will try to query whether a networked drive is around on another computer. If it isn't then the call to it can be blocking your file UI.
A third problem I've noticed with file selection dialogs and explorer is that the My Computer 'folder' that contains your disks takes a long time to load. Much longer than any sub-folders on any of the drives.
I think the problem is largely with explorer.exe. If I browse those folders in a web browser the experience is snappy.
There's also Dtrace https://learn.microsoft.com/en-us/windows-hardware/drivers/d...
That's why the obfuscated it and now it takes 30 seconds. (Win 10). Unless you want to save on OneDrive.
When apps have these kinds of interruptions all over the place, that's even worse than just having them at startup.
What is worse than that: not being able to predict if inputs will be buffered or dropped during unresponsiveness. I kind of look like an idiot when I keep clicking/typing away on someone else’s computer while things are frozen, thinking “oh, it’ll catch up in a bit”, and then 5 seconds later I have to work harder to fix the chaos: some keystrokes at the beginning made it through, then only every other one, then the next couple hundred got dropped, but the next 100 came through fine, and interspersed everywhere there are bizarre runs of duplicated keys, as if I had held the letter aaaaaaaaaaaaaa down continuously.
Everyone’s mix of hardware, OS, text editor, text editor plugins, etc makes this behavior highly variable, and hard to guess if it makes sense to keep typing or just wait out the frequent 1-5 second lockups.
Also that threshold is an entire 400ms. We should expect significantly better than that these days.
Also impressive how our brain is sensitive to all of this.. no matter how impressive a current OS / web browser / jitted js is.. I dearly miss the past eras "behavior".
1GB programs are rarely instant but that's usually just the price for very complex functionality if it's too interconnected to load parts of it on demand.
I'm quite impressed of both .NET and OpenJDK in some metrics, but it is often not resource efficient, which is something I do value.
One example of an application that works as I would expect others to do is MuPDF, Being able to open 20MB+ PDFs in 1/10 seconds on a 10 years+ old laptop.
By the way, does anyone know why Debian launches LibreOffice so much quicker than Ubuntu, Fedora or Archlinux (or any other distro I've tested with)? In Debian its 1-2 seconds, and the others 5-10 seconds. I mean it could be included extensions or how they are configured, but I'm honestly interested.