Tag Info

Hot answers tagged

4

In the examples you provided there is most probably no difference, since all the necessary conversions will most probably be performed at compile time. The following will incur a slight performance penalty: if( floatVariable > intVariable ) The penalty will be of the order of an additional clockcycle. (Maybe two? three clock cycles at most? that's ...


2

There are a couple different ways you might deal with long running blocking tasks: Increase the number of workers. As long as CPU utilization in staying low, additional workers will allow you to more quickly dispatch these long running service calls. More workers only becomes problematic at the point that some resource is under contention (cpu, memory, ...


2

While there are no hard rules about the size of a controller, 5000 lines is clearly beyond any reasonable size for a hand-coded class. Chances are this class is violating the Single Responsibility Principle (SRP) and therefore is flawed. You most likely have several methods in there that can logically be grouped together. See if you can't extract methods off ...


2

Microservices incur a penalty in both performance and complexity that is usually traded off in order to be able to scale out more easily (adding more instances of various microservices independently). If you're building a small system, avoid the runtime and cognitive overhead by just building out your app as a "monolith". (a terrible word that people now ...


1

Please don't follow the advice in that article. The author is correct to advocate immutable objects. But to get the advantages of immutable objects, the object should be transitively immutable. That is, it should only keep references to other transitively immutable objects. It shouldn't be referencing data providers, and it certainly shouldn't be keeping ...


1

The only time I think format matters is with dynamically downloaded code - ie things like javascript where huge blocks of comments and/or very long variable names will slow down the download, but even then this does not affect the compile time. (and the download time can be fixed by minimising the javascript file). For compiled files, the source is just a ...



Only top voted, non community-wiki answers of a minimum length are eligible