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

learn more… | top users | synonyms

1
vote
1answer
62 views

Is console logging inappropriate for chatty applications?

12 Factor states that applications should log to the console, those console logs should should be unbuffered, and the logs should be redirected to someplace useful (file, database, whatever). But ...
-6
votes
0answers
60 views

what is good for performance in for and for each loop of c# [closed]

what is good for performance in for and for each loop of c#.
3
votes
1answer
73 views

Designing a better performing total permissions setup for multiple permission levels

We've got a global system that we are attempting to solve a permissions issue around. Currently, our system serves a number of different applications out to our clients and each client has their own ...
-1
votes
2answers
128 views

Does code format affect performance?

I think I have came across a few times when I reformat some segment of code, it performed the way I wanted it to other than the other poorly formatted segment of code? Does code format affect ...
0
votes
1answer
40 views

Balancing between performance, convenience & separation

Consider a web application that works with somewhat sensitive data on reliable, high performance clients. The data needs to be processed and manipulated. So far I have learned that when possible, ...
12
votes
8answers
352 views

500 databases or 1 database with 500 tables or just 1 table with all the records? [duplicate]

I currently have an application that is used by a single end customer. For ease of discussion assume the application only needs a single database table for all records. I now need to support ...
3
votes
1answer
56 views

Filesystem superblocks and their backup copies

I'd like to understand how (modern) filesystems are implemented and having trouble to fully understand superblocks and their backups. I reference ext4 and btrfs, but the questions may also apply to ...
4
votes
1answer
390 views

avoiding multiple calls to SQL while being modular

I have a BusinessLayer.dll which calls DataAccessLayer.dll which ultimately makes the tcp connection to the SQL server. Each business layer method has a corresponding method in the data access layer ...
2
votes
2answers
107 views

Combine union with distinct

Situation: I need distinct results from two tables, that both have duplicates. I would like to know if I should combine UNION and DISTINCT. Example 1 - Only use distinct SELECT DistinctValue FROM ...
1
vote
2answers
198 views

Infinite while loop CPU usage

I'm coding an script in C, which is going to check constantly an array of events, the idea is to check if the Date and time of certain event is equal to de current time and trigger something, i'm ...
0
votes
2answers
119 views

Should I worry about performance, even if there is no loss of convenience? [duplicate]

Assume an application that shows a data table. The data is loaded from a database when the program is initialized. Each value in the table is represented by an input field, where each keypress in one ...
0
votes
2answers
146 views

How does the Common Language Runtime improve performance? [duplicate]

I read on the wikipedia article for Common Language Runtime that one of the benefits that the runtime provides is "Performance improvements". Executing managed code (Or bytecode) must surely always ...
2
votes
3answers
264 views

Could the creation of many methods in Java affect performance? [closed]

I was told by a colleague that in Java, the performance may be worse if we create more methods, stacking many methods calling over them in JVM, specially in a Java EE environment. This seems to ...
4
votes
2answers
99 views

To find the oldest/newest element in a heap

I want to find the oldest/newest element added into a heap of size k. At any given point of time if I have to find say the oldest element in the heap is there any approach with O(1) space and O(1) ...
3
votes
7answers
242 views

Are mutliple database calls really significant with a network call for a web API?

At one of my employers, we worked on a REST (but it also applies to SOAP) API. The client, which is the application UI, would make calls over the web (LAN in typical production deployments) to the ...
2
votes
4answers
507 views

Why aren't we building and using parallel processors *meant* for general computation?

We all know GPUs are much faster than CPUs for a wide range of applications. When someone asks why we are not just programming for GPUs at all, one of the most common answers is that GPUs are not good ...
0
votes
2answers
238 views

Mobile App Development-Architecture/Platform: Main performance concern: device/UI responsiveness [closed]

I am currently investigating different alternatives for building a mobile instant messaging application for iOS and Android, using an XMPP server (probably ejabberd) as the back-end. Main requirements ...
-3
votes
1answer
60 views

How create unit test the performance of an application? [closed]

What I want is to run automatically methods to tests the performance of an application. Just like the unit tests, but with the purpose of evaluate the performance and create reports if is it possible. ...
3
votes
1answer
178 views

How do I add link-time optimization capabilities to my LLVM-based compiler?

I am designing and implementing a programming language, and I am using LLVM for native code generation. Among others, performance is a key feature of the language, and as such, I am looking to ...
1
vote
2answers
165 views

How to measure algorithm accuracy?

I have a few optimization algorithms (for finding function minimum) and I'd like to check how good they are. Suppose I build test cases and compare the actual results to theoretical ones. What ...
27
votes
15answers
2k views

In the days of modern computing, in 'typical business apps' - why does performance matter? [closed]

This may seem like an odd question to some of you. I'm a hobbyist Java programmer. I have developed several games, an AI program that creates music, another program for painting, and similar stuff. ...
1
vote
2answers
320 views

How to approach program design with respect to data strucutres and algorimths - is there an equivelant of the OO design process for d.s.'s + algs? [closed]

My applogies for probably the worst written body of text I have produced in my life and many thanks to those willing to plough through it all. I was (and still am) not able to clearly express what I ...
1
vote
1answer
94 views

Entity-Attribute-Value table vs single table for storage of posts, events and pages

I am trying to decide whether to just use individual tables with more fields for storing posts, pages and events or using tables with basic fields plus having EAV tables as well for fields that are ...
9
votes
5answers
944 views

Are there technical limitations or language features that prevent my Python script from being as fast as an equivalent C++ program?

I'm a long-time Python user. A few years ago, I started learning C++ to see what it could offer in terms of speed. During this time, I would continue to use Python as a tool for prototyping. This, it ...
0
votes
2answers
69 views

Static and dynamic data : should I use different databases?

Say I am building a website that uses two different types of data : Static : information that will hardly change, like movie awards or world countries names (I want fast access so no external API) ...
-1
votes
1answer
66 views

Huge long addition overhead compared to Native call?

A run a simple test JDK 1.7.0_45 (Windows 7, 64bit): Test 1: long start = System.nanoTime(); for (int i=0; i < 1000000; i++) { System.currentTimeMillis(); } elapsed = ...
5
votes
2answers
367 views

Should I group all of my .js files into one large bundle?

One of the difficulties I'm running into with my current project is that the previous developer spaghetti'd the javascript code in lots of different files. We have modal dialogs that are reused in ...
0
votes
4answers
265 views

What is the “1620's multiplication operation”?

I was stumbling through Wikipedia when I came across the entry for FLOPS, specifically the table in this section. The first entry is for a computer from 1961, the comment on the right reads The ...
0
votes
0answers
22 views

Defining property and find substitution for copy function of python in cython

I want to cythonize a code in python to speed up the code. In the following you can see my attempt to make my python class understandable for cython: import numpy as np cimport numpy as np ctypedef ...
3
votes
2answers
273 views

What's a good simple way to combat the n+1 problem?

I'm trying to better understand performance in PHP. One issue I'm thinking about is the n+1 problem. By n+1 I mean something like this: $posts = Posts::getPosts(); foreach($posts as $post) { ...
4
votes
1answer
213 views

Why does Haskell's built in max function run faster than mine?

I noticed that for some reason, Haskell's built in max function (which returns the greatest of two numbers) runs much faster than the one I wrote, even though they are essentially identical. From ...
1
vote
4answers
133 views

Track performance numbers

I have a (large) software project in a git repository. There is a benchmark suite that spits out lots of numbers (time per benchmark, allocations done per benchmark) I’d like to track. What is the ...
17
votes
4answers
630 views

How bad is it calling println() often than concatenating strings together and calling it once?

I know output to the console is a costly operation. In the interest of code readability sometimes it is nice to call a function to output text twice, rather than having a long string of text as an ...
3
votes
3answers
346 views

Data Oriented Design - impractical with more than 1-2 structure “members”?

The usual example of Data Oriented Design is with the Ball structure: struct Ball { float Radius; float XYZ[3]; }; and then they make some algorithm that iterates a std::vector<Ball> ...
4
votes
1answer
521 views

In Java, why use bit hacks when non-bitwise technique it is more readable?

Is there any legitimate use for bit manipulation hacks in higher-level languages such as Java? I can see them being useful in speed-sensitive low-level and computation-intensive programs, e.g. ...
-1
votes
1answer
202 views

get all the combination of a given set of numbers [duplicate]

I m trying to get the possible combinations of a given set of numbers say for example 123 The possible combinations would be 123 132 213 231 312 321 For this i have written a code as below - ...
0
votes
1answer
118 views

Power of 2 and performance in SQL Server

Many mathematical operation (such as division, multiplication, etc.) are supposed to be computed faster when dealing with power of two numbers (C++, C#?, ...) For instance 15 * 256 = 0x0e right ...
26
votes
9answers
3k views

Is template “metaprogramming” in Java a good idea?

There is a source file in a rather large project with several functions that are extremely performance-sensitive (called millions of times per second). In fact, the previous maintainer decided to ...
11
votes
4answers
324 views

Database design - Store state or compute state every time?

Let's say I have a relational database application and a "user" object and a "message" object. Now I want to show the number of unread messages to this user. What's the best way to archive this? Do I ...
0
votes
2answers
237 views

Is there a downside to using AggressiveInlining on simple properties?

I bet I could answer that myself if I knew more about tools to analyze how C#/JIT behaves but since I don't, please bear with me asking. I have simple code like this : private SqlMetaData[] ...
1
vote
1answer
99 views

In general: guard pages or heap checks? [closed]

I would like to know the advantages and disadvantages of using guard pages with bump-pointer allocation versus heap checks with bump-pointer allocation, including performance as a consideration. In a ...
-2
votes
1answer
241 views

What is the best way to get a method name in runtime?

Here is a little background of my problem: I implemented a singleton logger class which is being called from several projects. I want to log the name of the class as well as the name of the method ...
3
votes
1answer
318 views

Why did Shannon's outguessing machine beat Hagelbarger's?

I'm reading "Rock Breaks Scissors", which describes two "outguessing machines" built at Bell Labs that try to exploit human non-randomness in the game of matching pennies. There was an outguessing ...
6
votes
1answer
818 views

Why use Android Fragments?

I have read the documentation and some other questions' threads about this topic and I don't really feel convinced; I don't see clearly the limits of use of this technique. Fragments are now seen as ...
0
votes
1answer
143 views

Good approach for hundreds of comsumers and big files

I have several files (nearly 1GB each) with data. Data is a string line. I need to process each of these files with several hundreds of consumers. Each of these consumers does some processing that ...
1
vote
2answers
94 views

Which is more expensive multiple conditional branches or multiple relational expression in a single condition?

Which is more expensive in terms of processing costs if ( x < 20 && z == "M") { // statements 3 } if ( x >= 20 && w && x <= 65) { // statements 1 } if( x ...
2
votes
2answers
130 views

How faster could a dedicated chip do sequential squaring modulo operations to break a time crypto capsule?

I'm facing a very real problem and, sadly, I cannot find the answer on my own: I'm hitting my limit as a programmer because my hardware knowledge is not sufficiently advanced at all. It's an issue ...
1
vote
2answers
241 views

Polling vs events pros and cons in JavaScript

I'm bit of a novice to JavaScript so I've been wondering on positive and negative sides of using polling compared to using events in JavaScript? When does one use one or the other? By polling I ...
0
votes
2answers
905 views

foreach in list or foreach in list.where [duplicate]

I don't know what to call this question. This is my example: foreach (var item in lstItem.Where(item => stock.ItemCode == item.ItemCode)) { stock.ItemName = item.ItemName; ...
0
votes
2answers
112 views

How should I create object after database insert PHP

I have just been working on a new project and doing things the same way I have for years now. However for the first time, I am constantly thinking about scalability and performance of both the ...