News for hackers. Stuff that matters.
Re:Handmade: A Community for Self-Rolled Performant Software... by PaulDavisThe1st on Monday August 17, 2020 @12:23PM (#24188709)
I've been writing C code for more than 30 years, C++ for 27. I've written code at every level of "the stack", from kernels of several nix-related operating systems to application GUIs. I've worked on "plumbing", on libraries, and on applications.

And here's the thing: I understand, at a very very deep level, precisely why my application is slow to start up. I understand it at every level from the semiconductor gates in silicon up to the color specification lists used by the GUI toolkit. But none of that helps me make it as fast as the handmade community thinks things should be.

Why? Because I know that the slow startup is caused by substantial amounts of code that all add useful functionality for at least some of my users. Do I want to get rid of i18n? Shall I skip checking for new versions? How about forcing plugin scans to be initiated by users and never doing them automatically (don't even think of suggesting doing them in another thread, and don't ask me why)? Shall I skip the ability to handle RTL text? Should we drop human readable and editable configuration files in favor of some faster and less resource-eating format? How about a scalable GUI, is that really useful for most? How about a themeable GUI, given that it's not actually that themeable anyway?

And so on and so forth. Each one of the above (and lots more) contributes just a little bit to the slow startup. For most users, all but one of them will likely seem not very important. So which ones do we drop to get back to the sort of startup times that the handmade community seems to expect?

Because let's face it, xterm can put a window on the screen before my finger is off the return key. So why not a DAW (or an IDE or an editor or a vector graphics app or an image editor or a browser or a circuit emulator or whatever your thing is) ? Just which features do you want to cut to accomplish this?

Re:Handmade: A Community for Self-Rolled Performant Software... by Olreich on Monday August 17, 2020 @01:31PM (#24189485)
Let’s call 1 second the threshold for a bare system with an SSD and 4 core CPU at 2Ghz. That gives you 8 billion cycles to start up, trading off with file access, so maybe only 4 billion of those have access to all the data you need in memory (modern ssd loads what, 400 MB/s?).

So all the startup code and initial assets are larger than 200 megabytes and take more than 2 billion cycles to prep? Computers are fast, software is slow. Sure, things aren’t trivial to always fit in that package, but it’s disingenuous to say you need to take many seconds to start up.

Look at a giant piece of software that was built for more limited times: Visual Studio. It used to start up in milliseconds back in 2000. Now it takes 30 seconds. Did it really improve things so much to justify that in the intervening years? I’d go with no.

You know what else has an amazing set of features and capabilities including internationalization and accessibility and all those other complicated things? Web browsers. And there’s not a browser on the market that doesn’t start up in more than a couple of seconds, including loading a full webpage and rendering it from the internet.

Re:Handmade: A Community for Self-Rolled Performant Software... by PaulDavisThe1st on Monday August 17, 2020 @01:59PM (#24189871)
Well, maybe I'm being too harsh on myself. Timing Ardour on my machine (Ryzen 2950X with 64GB of RAM), it has something on-screen is less than 1 second. But actually loading a "significant" session is more like 6 seconds. There's approximately 300MB of data in the session in total, but most of that is audio data that isn't being read at startup.

I've seen DAWs start up massively faster than this, though. And also slower. Essentially I have some intuition that "correct" software design would appear to the user as a more incremental startup: the window would appear as rapidly as xterm does, and would slowly fill with everything that makes up the actual program. I personally find this hard to design for. Could be me, or the GUI toolkit I use or maybe it just is pretty hard.

As for browsers, "a couple of seconds" has some slop. When I restart Firefox here, with typically 100-200 tabs and the main/primary/#1 tab being gmail (unfair! i hear you cry), I'd say it was more like 5-10 seconds until it is usable.

Re:Handmade: A Community for Self-Rolled Performant Software... by bjarkeck on Tuesday August 18, 2020 @12:55PM (#24201071)
So what you're saying is that it's okay for Windows Modern photo app to take 3 seconds to boot up and show an image on the monitor? And it's okay for the image to be blurry and misplaced in the first couple of frame, then corrected in the next couple of frames. And it's okay that it crashes once in a while too, and it's okay for it to be frames behind when resizing, because all of those things is simply the result of features and layers of abstraction that have some little purpose whatever that purpose might be. And you're okay with your software suffering for it?

To me, it's completely unacceptable and not the userexperience I want to give. Where do you draw the line is the question, but I personally want to provide the best experience possible.

The quality of software these days are extremly bad, buggy, big, and slow. And I'm not okay with it, despite how many reasons there might be. And the reasons for it is usually massive amounts of code, frameworks, and layers up layers upon layers of abstractions.

So you want your software to check updates? Well find a way that doesn't make the start-up time or user-experience suffer for it- otherwise don't implement it. That would be my answer to that. I know standards like that can be hard achive in a business, but those are the goals I want to become better at achiving. And to me, that's what handmade is about; giving me the confidence to build my own systems, making them more responsive, and provide a BETTER user experience. Maybe with less features, yes. But at least the features that are there will be extremly good!

Re:Handmade: A Community for Self-Rolled Performant Software... by PaulDavisThe1st on Tuesday August 18, 2020 @04:00PM (#24203627)
I'm not saying that any of these things are OK.

I'm saying that I know that my application does not start up as quickly as the hardware I personally run it on would suggest, and that I know why that is, but that doesn't help me know what to do about it.