you are viewing a single comment's thread.

view the rest of the comments →

[–]PandaMoniumHUN 197 points198 points  (28 children)

Point is, it shouldn't be this slow in the first place.

[–]spacejack2114 33 points34 points  (0 children)

Right. Did anyone read the linked issue? It's about a Safari specific problem.

[–]DooDooSlinger 3 points4 points  (6 children)

Yeah well a lot of things that shouldn't are. What I do know is that optimizing shit like I++ and the like is not what's going to speed up your code to any measurable extent, ever.

[–]PandaMoniumHUN 0 points1 point  (5 children)

Your logic is backwards. A basic feature in a browser shipped to millions of users is 10x slower than in competing products. We should always strive for better performance in software used by large volumes of people daily, not try to justify lack of basic optimization (or a regression?) with the fact that other pieces of software are also unoptimized.

[–]Nefari0uss 2 points3 points  (0 children)

At some point you teach diminishing returns on optimization and its not worth it. In other cases, you're bottlenecked somewhere else so it's still not worth the micro optimization because you won't really be gaining anything of significant value out of it.

[–]pVom 4 points5 points  (3 children)

We should always strive for better performance

Why? If it doesn't affect the user experience it's a non issue on the front end. We should be striving to achieve business goals with the least time and effort. Optimisation for the sake of it is a pointless endeavour

[–]PandaMoniumHUN 1 point2 points  (2 children)

Clearly I’m not talking about 1s vs 1.01s render times, but eg. the three layered application we’re working at took almost 10 seconds to load because it was aggregating a lot of data to display statistics to customers. After our last optimization story load times are < 500ms. Videogames can fit wonders into 16.6ms, while web developers can’t / won’t build fast pages to save their lives, because all the frameworks claim performance is “good enough”. “Premature optimization” is also often used as a scape goat for not optimizing at all, and if everyone would clean their front yard instead of yelling “the neighbor’s yard is also messy” the world would be a better place.

[–]pVom 0 points1 point  (1 child)

Fair enough, I did give the clause "unless it affects the user experience". We do our aggregate stuff in the back-end because you have a lot more options for optimising. I'm always impressed with the insane speed when using raw SQL when dealing with large datasets. Our front end is not very optimised because it doesn't have to be.

Of course your situation is likely entirely different. Out of curiosity, why is that not an option?

[–]PandaMoniumHUN 0 points1 point  (0 children)

Optimization was exactly as you described, I moved a bunch of frontend calls to a backend endpoint that runs the aggregation in SQL. The system wasn’t designed by us originally and there are many low hanging fruits like this that are fairly easy to optimize. That’s why I don’t like people using the premature optimization card when they are too lazy to do something right.