Live data from Hacker News

Slow Software

inkandswitch.com

141–150 of 272 posts

Re: Slow Software

#141

> We hope this material is helpful for you as you work on your own software. Sadly, as interesting as the material in the article is (great to learn about the measured latencies of the hardware part), I fail to see much that is "actionnable" for a run-of-the-mill software developper. It seems the only advice is "don't download ad / tracking / social media - related stuff", but even that is not exactly in the developp…

The author doesn't say you should use a language without GC, but minimize its effects. There are techniques to avoid GC churn by reducing allocations and the subsequent cleanups.

I heard an anecdote about how Minecraft got much slower when Notch (the original developer) turned it over to a team of employees. The new team did some refactoring, e.g. instead of calling functions like

  doWork(int x, int y, int z)
they refactored that into

  doWork(Coordinate c)
and that's when Minecraft started eating RAM like some sort of delicious candy, because now each time you deal with a new Coordinate, it's one more object to garbage-collect. The old method may not have been particularly pretty, but plain ints are allocated on the stack and thus reduce GC pressure.

(BTW, can anyone confirm or deny that anecdote?)

Re: Slow Software

#142
post #66
post #54

Somebody once posted a well known news website with an alternate link that loaded instantly. Anyone remember this? I don't remember if it was WSJ, or NYT or something else.

In theory, AMP pages should all load instantly, and most news websites have AMP pages. A lot of HNers hate AMP for other reasons, though; I think mostly Google's insistence on using their CDN for it, and for whitelisting mostly their own scripts for use in AMP.

> In theory, AMP pages should all load instantly

In practice, AMP pages take a minimum of 5-10 seconds to load for me. Maybe Google is punishing me for my uBlock/uMatrix/Pi-Hole setup.

Re: Slow Software

#143

Earlier quoted context omitted.

The author doesn't say you should use a language without GC, but minimize its effects. There are techniques to avoid GC churn by reducing allocations and the subsequent cleanups.

I heard an anecdote about how Minecraft got much slower when Notch (the original developer) turned it over to a team of employees. The new team did some refactoring, e.g. instead of calling functions like doWork(int x, int y, int z) they refactored that into doWork(Coordinate c) and that's when Minecraft started eating RAM like some sort of delicious candy, because now each time you deal with a new Coordinate, it's o…

[deleted]

Re: Slow Software

#144
post #138

Only since I work fulltime with gcc hogging all my CPUs and most of my RAM for up to 10 minutes at a time and also slowing down the computer I fully appreciate having worked in dynamic languages for many years. Yes, that problem might be solvable with a beefy build box.

The difference is interpreted vs compiled, not dynamic vs typed. You can use a C interpreter to instantly run C code without compilation.

Re: Slow Software

#145
post #79

Earlier quoted context omitted.

> I really just want to work somewhere without anti-virus. Not trying to be hostile.. but why aren't you? I've never worked anywhere that required anti-virus, so I know there are jobs out there that don't require it. In recent years I've gone so far as to take the stance that I won't use company computers at all, only my own, and I still haven't had any problems finding work. Unless you have strict restrictions on sw…

I worked in such companies, where you need to sign that you assume all legal consequences of a virus being introduced into the company network via your computer.

Police officer in my country told my sister to not plugin her usb (which contained some camera footage) into his computer because HER usb will get infected with viruses from HIS work computer!! This was in an actual police station!

Re: Slow Software

#146
post #42
post #7

I seriously doubt the vast majority of the population cares. I mean, I do. I hate websites that take many seconds to completely load when I know they could take less than 1 second without the bloat. Hardcore desktop gamers and developers usually are also very performance conscious but that is minority. Sites keep piling hits while adding bloat, and it's totally counterintuitive. Why?

I care. One of my worst slow system experiences is my "new" Xfinity X1 "Entertainment System." Latency to remote control button press is on the order of a second or more. Worse than that, it will put prompts up on screen and not be ready for the input. For example, when I finish watching a recorded program it puts op a "Delete" prompt. If O press the OK button when this prompt appears, nothing happens. I have to wait…

I had an LG "Smart" TV for a year. It was horrible. Suppose that I want to change the channel to number 54:

1. Pick up remote. Type "5", "4", "OK". Put down remote.

2. Wait for 5 seconds. A "5" appears on the screen.

3. Wait for 2 seconds. A "4" appears on the screen.

4. Wait for 2 seconds. Channel switches.

I sold it and got a 40" screen for my PC instead. The PC actually boots faster than the "Smart" TV.

Re: Slow Software

#147

You will never massage and cram all the remote cruft efficiently enough to get back the responsiveness of an Apple II. Today’s software is turtles all the way down from the library to the sub-library to the JIT to the application and OS and hardware and they each need 5-25 milliseconds to even wake up. That’s before you even hit the network. Things don’t get bad, they get worse.

> Today’s software is turtles all the way down from the library to the sub-library to the JIT to the application and OS and hardware and they each need 5-25 milliseconds to even wake up.

Where do you get these numbers? I have programs that run from start to finish in 5 ms, including tons of OS syscalls.

I think many of us forgot how efficient OSes are because of the shitshow that app developers put on top.

Re: Slow Software

#148
post #116

I have an HP EliteBook with an i5 processor, 8GB RAM, and an SSD that’s about 70% empty (only 30% space is being used). It runs the latest Windows 10 image from work and is slow as molasses. Almost every action I take, be it a mouse click or hitting a key or switching between applications, takes a few seconds or much longer. I thought it’s a McAfee issue, but the CPU usage is above 50% almost all the time and this us…

In my experience on a similar configuration, most of the times such aliens is because of i/o bottleneck.

Antivirus, Windows app optimisations, and device manufacturers' softwares running at predefined schedules, choking the disk might be a problem.

You frontotemporal should check the process explorer next time you gave the issue. In the meantime, may be check the task scheduler to see if some heavy read write tasks are scheduled

Re: Slow Software

#149

Earlier quoted context omitted.

The author doesn't say you should use a language without GC, but minimize its effects. There are techniques to avoid GC churn by reducing allocations and the subsequent cleanups.

I heard an anecdote about how Minecraft got much slower when Notch (the original developer) turned it over to a team of employees. The new team did some refactoring, e.g. instead of calling functions like doWork(int x, int y, int z) they refactored that into doWork(Coordinate c) and that's when Minecraft started eating RAM like some sort of delicious candy, because now each time you deal with a new Coordinate, it's o…

I don't know about that particular anecdote, but the gist sounds very reasonable. I've seen/solved the exact same general thing in python on more than one occasion.

Re: Slow Software

#150

> We hope this material is helpful for you as you work on your own software. Sadly, as interesting as the material in the article is (great to learn about the measured latencies of the hardware part), I fail to see much that is "actionnable" for a run-of-the-mill software developper. It seems the only advice is "don't download ad / tracking / social media - related stuff", but even that is not exactly in the developp…

The author doesn't say you should use a language without GC, but minimize its effects. There are techniques to avoid GC churn by reducing allocations and the subsequent cleanups.

This. My last contract was working on digital TV UI software that was build using nodejs, so we did a lot of work optimizing our code and architecture to reduce latencies and load times. I ended up going down the rabbit hole of how v8, libuv and node's GC work. It was a great learning experience.

You really can influence your app's performance if you have the attitude and determination.

Post reply on HN