Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Of course performance always matter. Also testing your software under real usability also helps understand the performance.

Story time: I got hit by performance these very days. The app I'm developing for one of my clients has to process images from an USB camera. Under my development everything is dandy. Works like a charm, images gets processed and when the user hits the on-screen button that image gets stored in database as part of the entire process. Neath, yeah?

Well, it turns out my client is using a cheap from last decade tablet (I'm a purist so this decade will end on 31st Dec 2020) that due to processing 30 frames each second from USB camera, has little time for actual GUI responsiveness. And the app feels sluggish, with 1 second delay between my tap and the combobox firing up. Turns out, it didn't need to actually process all those 30 frames each second. On per second will suffice, hence I've implemented to only process on frame every second. More than enough for customer's needs and now the app is also flying on that old hardware.

My 2 cents.



> hence I've implemented to only process on frame every second

That's merely a workaround, not a fix. Next day someone will use a 8k camera on the same slow tablet. Another day someone will run your app in parallel with with some other process consuming all CPU cores.

A fix would be making so that however slow the computer is, processing frames from the camera doesn't affect GUI latency, at least not by much.

You probably gonna need multithreading for that. And if that 2010 tablet only has a single CPU core without hyperthreading, you might need to adjust the priority of that camera's thread. But it's all doable.


I have bad news for you my friend. Everything is a workaround. You do workaround your family, you do workaround your kids and you do workaround your health.

You have seat-belts on your car? Is that a fix or a workaround? Because a fix would be to actually have a car that doesn't crash at all. But would not be economically viable.

You have plastic insulator around your electricity wires to prevent you getting electric shock. Is that a fix or a workaround? Because a fix would be to actually have continuous current at max 12V as power lines. But that's not economically viable.

You have kids going to school and strangers are educating your kids a good portion of their life, molding them sometime against your values. Is that a fix or a workaround? Because a fix would be to have them home-schooled under your eye. But that's not economically viable.

I can do this all day.


> You have plastic insulator around your electricity wires to prevent you getting electric shock. Is that a fix or a workaround? Because a fix would be to actually have continuous current at max 12V as power lines. But that's not economically viable.

Your examples are wanting.

Wires are also insulated to stop them from touching each other, not just to prevent electrocution. A 12V wire touching another can definitely result in sparks and fire. It can even amputate your finger if you bridge with your wedding ring.

In virtually all situations wire needs insulation - it's a feature not a workaround.


Did you know that when they first implemented electricity they just buried them pinned with nails on wood, no insulation? Back then insulating wires was more expensive than just eating energy losses via running current.

Like I said, it all comes down to economics.


I'd really like to see evidence of this... if you bury wires directly, the voltage will speed corrosion to the point you won't have wires after a few weeks at best.


Buried them behind drywall and ceilings, not in dirt.

Look up https://en.wikipedia.org/wiki/Knob-and-tube_wiring that is in some cases operational even after a century.


>You have seat-belts on your car? Is that a fix or a workaround? Because a fix would be to actually have a car that doesn't crash at all. But would not be economically viable.

Lmao. I like this perspective. I guess all if life is basically a workaround to not dying.


Multithreaded software is all over the place. The process on my PC implementing this browser tab has 38 threads.

For experienced developer using the right tools/architecture it's not even that expensive to develop.


Are you seperating the ui thread from your processing thread?


Not on this app. Also the tablet in question is single core processor so implementing multi-thread is actually even worse. As a detail I left out on above story, this is one of the first surface tablets running Windows 10. I mean it needs W10 because security update reasons, but it was not designed to run such a demanding OS. And then comes my app that requires even more processing power of an already filled up to the guts hardware. Hence the breaks on demanding too much processing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: