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

learn more… | top users | synonyms (1)

0
votes
5answers
135 views

Best approach to write on a database with two webservers

I have an architecture/performance problem. The problem: One voting based application with: 1 loadbalancer, 2 webservers and a database 10 candidates and 200k voting users. There may be more than ...
39
votes
7answers
7k views

In software programming, would it be possible to have both CPU and GPU loads at 100%?

This is a general question on a subject I've found interesting as a gamer: CPU/GPU bottlenecks and programming. If I'm not mistaken, I've come to understand that both CPU and GPU calculate stuff, but ...
19
votes
6answers
3k views

Why did the team at LMAX use Java and design the architecture to avoid GC at all cost?

Why did the team at LMAX design the LMAX Disruptor in Java but all their design points to minimizing GC use? If one does not want to have GC run then why use a garbage collected language? Their ...
4
votes
1answer
762 views

Is there a formula to figure out the total execution time of sequential asynchronous processes?

I have a set of steps that need to run sequentially over a list of data. However each step only operates on a single piece of data at a time. Because of this, I can run the steps asynchronously. For ...
2
votes
3answers
1k views

Recommended guidelines for declaring bash/sh variables

I have been programming in BASH for a while now and the scripts that I write are starting to get more complicated. I realized that I started to bring in some habits from C/C++ and wanted to get ...
2
votes
1answer
37 views

VBA Outlook: quickly find subfolder

I have the following structure in my Outlook Public Folders. -Public Folders --1001_RandomProject --1002_AnotherProject --1003_Yetanotherproject ... and so on, basically there's a couple of ...
5
votes
2answers
6k views

How to hide the python code from users?

I am developing a paid application in python. I do not want the users to see the source code or decompile it. How can I accomplish this task to hiding the source code from the user but running the ...
2
votes
1answer
110 views

What is the correct way to test performance of methods?

I made a few classes for processing and validating data in xlsx and csv. However, I am curious in testing how fast the methods I wrote in C# for the heavy lifting are. Here's what I currently am ...
6
votes
5answers
367 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
3answers
294 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 ...
0
votes
2answers
158 views

Why do successive iOS versions take longer to run the same task on the same hardware?

Updating the iOS version on an old iPhone tends to make basic operations like startup, placing calls, and checking settings take longer. The change from eg iOS 7 to 8 on an iPhone 4S has a very ...
-2
votes
3answers
116 views

What kind of projects/fields do programmers who enjoy code optimization find themselves in? [closed]

I think most of us strive to make our code run smoothly, read logically, and altogether function well. But for those who really enjoy taking the time to figure out how to optimize already good code (...
3
votes
4answers
8k views

Most Efficient way to Compute the sum of divisors of N (1 ≤ N ≤ 1 000 000 000)

I want to write a code which computes the sum of divisors of a number N(1 ≤ N ≤ 1 000 000 000), excluding the number itself. However, I need an efficient way to do it. It suppose to print the answer ...
-2
votes
0answers
34 views

Advice for a Javascript table library [closed]

I wrote a javascript program a few years ago that displays a large data table. I am currently using a thin wrapper around the basic html tag. This was never ideal, but it was easy to implement. As ...
1
vote
0answers
36 views

XElement.Parse and querying versus serialization (strongly typed objects)

We have a rather large code base that interacts with many SOAP based XML services. Each one of these services makes 1 to n service calls A typical low level web service call looks like this (...
0
votes
0answers
32 views

Optimal Simplification of Transposition Products

I am looking to take a product of a large number of transpositions, and boil it down to a smaller number of products. I have the following code, and would like some input on efficient ways to boil ...
-7
votes
0answers
36 views

TVP or cursor? What is better for performance? [duplicate]

I am populating a cursor with a max of 65 inserts, all for a single input variable for a sp. In terms of performance, should I use a table-valued parameter instead? I use them both, but I just would ...
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 ...
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;...
-2
votes
1answer
93 views

Duplicate code to avoid performance decrease due to function calls? [closed]

I have a simple list in Java that I need to search using one of two methods. The first method simply returns the position in the list of the first matching element. The second filters out any elements ...
3
votes
6answers
320 views

How efficient is malloc and how do implementations differ?

If I use malloc, does malloc always use the same algorithm regardless of what it is allocating or does it look at the data and select an appriopriate algorithm? Can we make malloc faster or smarter ...
4
votes
2answers
85 views

How to facilitate thread-safe access to large set of shared variables?

I have 2 sets--inputs and outputs--of 70 32-bit integer variables and 70 bools (140 vars altogether). These need to be accessed and modified from 3 threads. What is an appropriate design pattern to ...
5
votes
6answers
618 views

How much do function calls impact performance?

Extracting functionality into methods or functions is a must for code modularity, readability and interoperability, especially in OOP. But this means more functions calls will be made. How does ...
2
votes
4answers
6k views

Exporting huge data into XLS in a web application [closed]

I am developing a web application in Java/J2EE, in which I have export functionality. I have used Jasper for the same. The issue is when trying to export a huge set of data it is consuming a lot of ...
2
votes
1answer
85 views

Optimizing the exponential smoothing of a big array

I have a large set of values (let's say 1M entries) where I need to apply an exponential smoothing algorithm, but only incrementing one value at a time (all others decay to zero). The trivial ...
3
votes
5answers
110 views

Use Exceptions for control flow in order to increase performance?

I add a lot of elements to a list of lists. If the list of lists my element should be saved to, does not exist yet, I handle this by catching an exception and adding a new list to my list of lists. ...
27
votes
11answers
2k views

Did a gradual shift in methodology of writing code affect system performance? And Should I care?

Lest you be confused by what's to follow, here is the driving idea behind the question: I always intended the question to be what it is. I may not have articulated it well originally. But intent ...
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
votes
5answers
507 views

How to ascertain from the users if performance tuning has had the desired effect [closed]

So you've made some code changes that should hopefully speed up some part of an application. But there is just one problem - you don't know how it will perform in live. Different networks, different ...
177
votes
13answers
51k views

Should we avoid object creation in Java?

I was told by a colleague that in Java object creation is the most expensive operation you could perform. So I can only conclude to create as few objects as possible. This seems somewhat to defeat ...
1
vote
4answers
130 views

is stored procedure having multiple UNION efficient than running all SQL's in parallel?

I have below in my stored proc if then SELECT TABLE1.COLUMN1,TABLE1.COLUMN2,TABLE1.COLUMN3,TABLE1.COLUMN4 FROM TABLE1,TABLE2 where criteria1 (covers functionality 1) UNION SELECT TABLE1....
4
votes
0answers
58 views

Estimate if benchmark sampling difference is significative

In order to estimate the fastest function in various cases in a non fully deterministic context, I'm running an experiment calling one or the other at random and recording the duration of the ...
0
votes
2answers
87 views

JSON or XML or other - most time efficient for largely “read” of structured data

Considering that using a relational DB or other hierarchical or such databases is not an option, looking for the alternative approach using a simple (but very fast, efficient, distributed KV-store). ...
25
votes
11answers
2k views

How to deal with misconceptions about “premature optimization is the root of all evil”?

I've encountered many people who are dogmatically against anything which can be considered "optimization" in the general English-language sense of the word, and they very often quote verbatim the (...
-1
votes
2answers
90 views

Does sql use hastables for indexes? [closed]

Are there other ways of indexing?, Which are the more used? Does sql have an standard for indexes, it uses hash tables?
0
votes
0answers
19 views

Finding performance (network perspective) differences between mobile websites and their corresponding applications?

I'm researching performance differences when using an application, compared to its mobile website counterpart. To my help I looked into what other people define as performance(since it's a broad term) ...
2
votes
0answers
71 views

Maximising data processing speed: in-memory or write to db first?

Currently working on a system which allows users to upload data files, which we then "clean" (i.e. process in various ways). Speed of processing and return to the user is an important consideration, ...
1
vote
1answer
79 views

Clairvoyance in caching - optimal strategies?

This question relates to the question here, but I'll generalise it so that you can answer effectively without reading all of that. Context: Imagine you had a large set of data greater than your ...
2
votes
1answer
71 views

Caching in '3D' - data-structures and octree recursion - hrrm!

The Situation: I have 68GB of data that is conceptually realized as a 3D matrix of 8-bit values with dimension 4096*4096*4096. I need to access multiple sections of this data for processing in a ...
21
votes
5answers
14k views

JIT compiler for C, C++, and the likes

Is there any just-in-time compiler out there for compiled languages, such as C and C++? (The first names that come to mind are Clang and LLVM! But I don't think they currently support it.) ...
14
votes
6answers
646 views

Do changes in performance violate the Liskov Substitution Principle?

Say I have: interface Thing { GetThing(); } class FastThing : Thing { public int GetThing() { return 1; } } class SlowThing : Thing { public int GetThing() { ...
1
vote
1answer
63 views

«Heavy» object initialization: within each thread or outside and then pass it to the threads as parameter?

Let say there is an array of strings, I have to process. I'm using a «heavy» third-part object which gets the string and performs its analysis. In order to optimize a performance, I create a number of ...
-7
votes
1answer
191 views

Java: Why's this For-Loop thousands of times slower?

So I have a simple method I'm calling millions of times a second, and I noticed that it was taking 16% of all processing time!! The offensive routine is as follows: public void placeHolder(){ ...
3
votes
3answers
260 views

Iteratively improve software architecture & quality in an agile process?

Or to put it another way how to ensure that architecture or quality doesn't suffer, doing agile. Some of the understandings in handling architecture in agile are below(generally applies to testing as ...
4
votes
1answer
77 views

How do you handle Performance tasks in Agile?

How is the Agile process affected if a stakeholder requests that a specific operation in the software need to perform better? This could mean that it runs very slow for a customer's needs (even with ...
0
votes
1answer
64 views

Does variable type specification lead to any performance difference?

Let's say I have a very long method which basically creates a responsive and resizable layout for a user interface by using a few fixed values and a few variable ones taken from an element's ...
1
vote
0answers
73 views

Guaranteed message sending for messages of different priority for different modules

We have created a message que system using priority messages. The idea behind this is as follows: We have a list of clients. All clients know if (and what kind of priority) messages they have ...
-1
votes
4answers
195 views

Nested For Loops JavaScript

I have an app which gets data from the database (MongoDB) in JSON format. The returned data contains nested arrays and I want to access the values in the nested arrays. The returned JSON format looks ...
8
votes
2answers
180 views

Why does expressing calculations as matrix multiplications make them faster?

In Google's MNist tutorial using TensorFlow, a calculation is exhibited in which one step is equivalent to multiplying a matrix by a vector. Google first shows a picture in which each numeric ...
0
votes
1answer
273 views

How could this be considered performant code?

I came across this (Java) code yesterday and can't figure out why someone would have done this in any language. In what scenario, language, paranoid delusion would "removing" values from an ...