Questions related to improving application performance, this can be range from selection software architecture to selection of algorithms.

learn more… | top users | synonyms (1)

44
votes
6answers
4k views

Does immutability hurt performance in JavaScript?

There seems to be a recent trend in JavaScript towards treating data structures as immutable. For example, if you need to change a single property of an object, better to just create a whole new ...
3
votes
0answers
100 views

Tips for optimizing javascript code. a year's worth of Dates

I am playing around with the date object, i made a function that generates a bunch of dates, and applies some function on each date. For a month's worth, it is fine about 2.5ms on my pc, ff and ...
0
votes
1answer
51 views

When > apply a performance and memory profiler? [closed]

Based on your experience, when do you need to perform a performance and memory profiler for a web development project in C#? Today, Im newbie in performance and memory profiling.
4
votes
1answer
298 views

Best practice for Restful API that perform heavy calculations (Image Processing)

We are currently developing an image processing restful api. Server performs some CPU-heavy computations image processing upon request and return the image to the client. We want to make this a ...
2
votes
0answers
70 views

Dealing with big data [closed]

I am on a project dealing with a lot of data in the form of images and videos (Data related to wind engineering). My requirement is to build a predictive algorithm based on the data I have. I have ...
1
vote
1answer
163 views

Low cost exceptions implementation using metaprogramming [closed]

(preface - boring stuff, feel free to skip down to the implementation details) I need to provide exception handling to a language I am working on. It "compiles" to a subset of C, and since I don't ...
0
votes
0answers
90 views

Best datastructure to use

I am using Amazon's dynamodb nosql database and as a result I need to think of some ways to do certain operations to fit into their limits (e.g 4k item limit, can't combine small items into the same ...
1
vote
1answer
172 views

How to improve performance for serializing and deserializing a large object graph?

I have a large object graph in .NET (F# as it happens) that I need to persist to disk and then will load again periodically for use in a calculation. The performance of deserializing is more ...
12
votes
6answers
1k views

In general, is it worth using virtual functions to avoid branching?

There seems to be rough equivalents of instructions to equate to the cost of a branch miss virtual functions have a similar tradeoff: instruction vs. data cache miss optimization barrier If ...
3
votes
2answers
85 views

Stored Procedure performance

I'm working on upgrading an application written by a former developer at my work and I've been converting all the SQL queries in the code into Stored Procedures. I'm doing this with the idea that it ...
-1
votes
4answers
455 views

Fundamental issues of programming [closed]

I just let my brain run wild and the results are again chaotic. It is kind of bothering me how in the very basics, programming itself can be pretty redundant. Let's look at this snippet of code and ...
0
votes
1answer
195 views

Efficient way to store large number of image path per record into a database table? [closed]

I am trying to think of an efficient way to achieve this. We get a zip file that has a XML file containing around 1500-2000 items. Each of the item could have up to 20 images for it. The images are ...
1
vote
1answer
79 views

What are the impact to the server when using ajax polling for live web pages?

I've been searching on the internet about using interval ajax polling for live web pages and I've been using it along with SignalR. Now I always read an article online about using ajax polling for ...
2
votes
3answers
169 views

Long running DB query with concurrent write at the same time [closed]

We have a big table with a lot of data and a select query which takes 3 seconds to run. However we are a highly concurrent environment and each second we get 100 new records in our database. So let'...
-2
votes
2answers
120 views

How can I be quicker at resolving application performance problems [closed]

While I subscribe to and usually work in agile workplaces and I believe have reasonable standards, I often find performance problems difficult in the 'heat of battle', and may put off or not get ...
3
votes
1answer
130 views

What to do when properties of a HashMap and ArrrayList are neccessary?

I have a data structure that stores various permission groups for a multiplayer game server. There is an instance of a "Rank" class for each permission group. Each rank also has a name. I need to be ...
1
vote
1answer
161 views

Finite Element Shader

I am working on a geometric wrapper for a space jet exhaust impingement solver. A key part of the solution is determining what the jet can "see" and therefore hit. My model is grouped with nodes or ...
1
vote
2answers
165 views

Performance concern in object oriented languages [duplicate]

I recently moved into web development using ASP.NET MVC. The language I use is C#. Having considerable experience in C makes me look for optimized coding standards (memory, efficient data structures ...
7
votes
2answers
103 views

Strategies for investigating performance of an ASP.NET web application running under .NET 4

I'm trying to compare the performance of an application that has recently been converted from .NET2 to .NET4. From my perfomance tests it seems that although page response times are generally a bit ...
1
vote
3answers
140 views

Service oriented web architecture speed

Imagine a simple service architecture setup: single server where I have one service acting as a REST API (PHP), another service for rendering frontend (nodejs), and maybe a database service. They all ...
0
votes
1answer
487 views

Improving performance with caching of files in C# [closed]

EDIT: You were right, the problem is not checking if a file with the same name exists but the connection. I made a mistake measuring the time with StopWatch and included a part which used the network ...
1
vote
0answers
45 views

Cost of cache coherency/sharing data across multiple cores?

If I have two CPU cores, one is writing a particular cache line and the other core wishes to Read Write the same cache line, what are the costs (in cycles) for doing so? I am a little unsure ...
4
votes
2answers
84 views

How can I have a variable timeout value based on machine performance?

I have a similar problem as Criteria for selecting timeout value?. But my question is slight different. Process A dependes on process B and has a timeout value of 5 seconds, sometimes process B might ...
7
votes
3answers
1k views

Foreach loop and variable initialization

Is there a difference between these two versions of code? foreach (var thing in things) { int i = thing.number; // code using 'i' // pay no attention to the uselessness of 'i' } int i;...
6
votes
3answers
2k views

Is it good to define a variable inside a loop? [closed]

My instructor once told me that I should not define a variable inside a loop, but I honestly still do not understand why. What are the disadvantages of that? Could any body explain that to me?
2
votes
2answers
275 views

Maintaing drop down lists for the application

What would be the best approach to maintain the dropdown lists for the whole application (like city, state etc) taking into account the SOLID principles and performance? Right now am loading the list ...
3
votes
1answer
151 views

Does push via web sockets increases server load if I have too many write requests?

I have too many write requests to database. Currently my app implementation is such that it makes pull call to server every 5 seconds to update the changed data. If I implement push through web ...
1
vote
2answers
636 views

Alternatives to cron jobs or other ways of improving scheduled task performance

I'm working on a social networking website where users gain ratings after specific actions taken and proper conditions are met on the tables. The ratings are calculated depending on 'total hours ...
4
votes
6answers
233 views

Class design, responsibility granulation, efficiency and performance

I am in a design dilemma. I have a set of data that can be interpreted in numerous ways, but I cannot really decide how finely grained should it be. To illustrate it with some simple code: class Base ...
1
vote
2answers
73 views

Monitoring a web service

I don't know how to phrase this question properly so please feel free to suggest edits. I've helped develop an in-house RESTful service for a company I'm working for, and it seems to have hit a wall ...
2
votes
3answers
293 views

Design periodic batch notification system

Problem: I am trying to design a system which takes requests from customers in real time and log them in a database. For example - request to purchase an item. The customer then gets a unique ...
1
vote
1answer
500 views

Performance of sharing single object with multiple threads in Java

In Java, if I create an object that has a method to do something, and I pass that object to multiple threads which call the method, is there a performance difference from creating an individual ...
6
votes
5answers
365 views

Can a pimpl variation be implemented without any performance penalty?

One of the issues of pimpl is the performance penalty of using it (additional memory allocation, non-contiguous data members, additional indirections, etc..). I would like to propose a variation on ...
-2
votes
1answer
88 views

What's an effective threading structure for NIO and server performance in C/C++? [closed]

I run into this issue where if I do a read to check for data too often, my CPU skyrockets, and if I don't check often enough, it's slow for client performance. What's an effective way to deal with ...
3
votes
1answer
762 views

sort multidimensional array recursively - is this reasonable

In a nutshell, I needed to traverse any number of dimensions of a multidimensional array (or not) and I wanted the process to be as predictable as possible (in order to proliferate the pattern ...
0
votes
1answer
113 views

PHP MVC concept large controller

I have custom MVC framework in PHP and my controller file has about 5000 lines. The question is, is it a big concept flaw? It is structured code with kiss method and quite maintainable. Are there ...
5
votes
3answers
200 views

Do microservices scale down?

I've been reading up on microservices architecture, which gained a lot of recognition in recent years. As a big fan of UNIX philosophy, I find it very clean and sensible. However, exisiting ...
0
votes
1answer
201 views

Immutable class with behavior

I've just finished Effective Java and I loved it. I'm trying to refactor one of my programs to take advantage of what I've learned, and I have a lot of questions regarding immutability. My program is ...
2
votes
1answer
147 views

How do I handle long running third party calls from backing up my message queue?

Here is my exact scenario. I must make requests to a third party service The service takes ~15 seconds to respond It also has no webhooks or any call back mechanisms These requests are not made ...
2
votes
1answer
147 views

In C#, is it good practice to use implicit numeric conversions from int to float?

For example: if(5.0f > 1) { } Does it have a significant performance penalty? Compared to just doing if(5.0f > 1.0f) { }
0
votes
0answers
90 views

BCMath vs MySQL: performance

Scenario I am working on a web application that handles financial transactions, and my code will need to be reusable for everything from consumer carts to manufacturer/distributor shipments. The ...
-3
votes
1answer
326 views

Java - Best way to set properties of an object [closed]

I don't know if there is any difference in performance, or its just a matter of choice, but I am a perfectionist like that, and I'd like to know. Lets say you have the object HolySheet. You can set ...
0
votes
0answers
33 views

Where to generate View?

I plan to build a CRM for small companies. It is supposed to be a single-page application. Now I am unsure where it is more efficient to convert the data to HTML. Should I rather do it on the server ...
7
votes
2answers
411 views

How does the Hip hop virtual machine (HHVM) theoretically improve PHP runtime performance?

From a high level, how does Facebook, et. al use to improve PHP performance with the Hip Hop Virtual Machine? How does it differ from executing code using the traditional zend engine? Is it because ...
1
vote
1answer
201 views

How to handle rating? [closed]

I want to implement like/dislike system, but I don't know how to achieve best performance. I have to tables: blog posts and comments that need rating. Should I store all data in one rating table? Or ...
1
vote
2answers
202 views

Caching query results vs Querying each time (finding a middle ground)

This is kind of an expansion on a previously asked question Some background info: Querying Over 5,000 items from SQL database that eventually get sorted into a list depending on who the user is....
1
vote
1answer
115 views

When the result set doesn't matter should Left Join or Inner Join be used

When you have a query where you're joining from a non-null foreign key to the foreign table it doesn't matter if you use LEFT JOIN or INNER JOIN from a result standpoint (since there won't be any ...
3
votes
1answer
130 views

How do hybrid interpreter-JIT compilers work?

Chrome's V8 compiler, the Java HotSpot compiler, and many more have multiple tiers of interpretation and compilation. A function starts off as interpreted in HotSpot and then, if it is run often ...
5
votes
1answer
440 views

Kth selection routine - Floyd Algorithm 489

I have recently come across a promising Kth selection routine that reportedly outperforms quickselect the Floyd, Rivest Select routine. This Wikipedia article provides a pseudocode version which I ...
3
votes
5answers
482 views

Should I use BLOB or Tables for storing large data?

Problem Currently investigating a solution to improve the performance of a web application. The application works well for small projects, but faces performance issues in the UI when working with ...