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
3answers
207 views

The clock problem - to if or not to if?

Let's say, we have a simple digital clock. To "power" it, we use a routine executed every second. We update seconds part in it. But, what about minutes and hours part? What is better / more ...
3
votes
2answers
213 views

Improving the performance of a db import process

I have a program in Microsoft Access that processes text and also inserts data in MySQL database. This operation takes 30 mins or less to finished. I translated it into VB.NET and it takes 2 hours ...
1
vote
2answers
305 views

How to overcome network latency when using data as a service like Cloudant?

I just can't understand, no matter how good and scalable of Cloudant (data as a service), how one can overcome network latency issue? Even the data center is located within the same country, 100ms is ...
5
votes
2answers
423 views

Buzzword for “performance-aware” software development [closed]

There seems to be an overabundance of buzzwords for software development styles and methodologies: Agile development, extreme programming, test-driven development, etc... well, is there any sort of ...
1
vote
2answers
176 views

Setter Validation can affect performance?

In a scenario where you use an ORM to map your entities to the DB and you have setter validations (nullable, date lower than today validation, etc), every time the ORM gets a result, it will pass into ...
2
votes
2answers
257 views

Implementing set of processes in a stored procedure or through the code?

I want to know what's the suitable method to implement the following case (best practice). If i make a set of processes like this: select data from set of DB tables. loop on the selected result. ...
1
vote
1answer
236 views

Will JVisualVM degrade application performance?

I have doubts in JVisual VM profiler tool related to performance. I have requirement to implement a JVM Monitoring tool for my enterpise java application. I have gone through some profiling tools in ...
-1
votes
2answers
86 views

Applications affected by memory performance [closed]

I'm writing a paper on the topic of applications affected more by memory performance than processor performance. I've got a lot written regarding the gap between the two, however I can't seem to find ...
0
votes
2answers
175 views

Perfomance of 8 bit operations on 64 bit architechture

I am usually a Python / Database programmer, and I am considering using C for a problem. I have a set of sequences, 8 characters long with 4 possible characters. My problem involves combining sets of ...
1
vote
3answers
731 views

Storing a value vs calling reference for repeated use in Java

I have an old habit of avoiding calling references multiple times, both for easier to read/maintain code, and for possible efficiency. But I'm wondering which is more efficient (memory, performance, ...
2
votes
4answers
845 views

Database is performing slow, even all the tables are having normalization

One of the interviewers asked me this question: Tables are created with appropriate normalization rules, However the database is performing slow. [Ie.: The select, insert statements are taking ...
4
votes
4answers
407 views

What are the reasons for great performance differences running the same program?

I'm no computer scientist so please bear with me. Lately I wrote a python program that has to perform some expensive spatial searches while holding lot's of data in memory. I tried to improve the ...
3
votes
2answers
283 views

How relevant are “Requests per second” benchmarks?

Whenever a new framework is released it is a given that someone somewhere will benchmark it against other available solutions. One interesting benchmark is the "Requests per second" benchmark. For ...
2
votes
2answers
834 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 ...
7
votes
4answers
2k views

How to find bottlenecks in an application? [duplicate]

I'm building an application with lots of components, a lot of which are third-party so I only know what I can get from their documentation. From time to time, by pure luck, I find out one of these ...
3
votes
4answers
320 views

Should We Code for Performance or Stability? [duplicate]

There is a point in time where you make design choices and debate them with management. In my case I have to debate my positions and design choices with senior management but it is frustrating that ...
3
votes
2answers
811 views

CA1819: Properties should not return arrays. Does this happen only with arrays? If yes, why?

I have a question about CA1819 msdn performance warning. The rule is: Arrays returned by properties are not write-protected, even if the property is read-only. To keep the array tamper-proof, the ...
5
votes
4answers
715 views

Performance related doubt in Java with Hibernate

Suppose in some ORM based project (say Hibernate) I am trying to fetch only few columns rather then the whole Object with may be more than 20 attributes. I am writing HQL like "select attr1, attr2 ...
9
votes
5answers
2k views

Is try-finally expensive

In case of code where you have to do a resource cleanup before exiting a function, is there a major performance difference between these 2 ways of doing it. Cleaning the resource before every return ...
1
vote
2answers
2k views

Is rewriting some Java code to C++ using JNI to improve performance a good idea? [closed]

I've tried rewriting some Java functions in C++ and called them using JNI. I observed that it takes longer time to execute the native C++ functions as compared to Java functions, due to the JNI ...
0
votes
1answer
184 views

Will having ClassA extend ClassB slow down my runtime performance compared to having classC which contains all the members of ClassC?

I have a class with a lot of methods. I would like to group similar methods together in their own class, but all of the methods need to extend another class, ClassC. So I was thinking of having ...
2
votes
1answer
1k views

best way to store data from ajax call

I am writing a web-application in which I am retrieving data's from server through AJAX requests and the generate HTML content dynamically. I have some data to load, generate HTML from it and append ...
37
votes
12answers
2k views

Documentation in OOP should avoid specifying whether or not a “getter” performs any computation?

My school's CS program avoids any mention of object oriented programming, so I've been doing some reading on my own to supplement it -- specifically, Object Oriented Software Construction by Bertrand ...
2
votes
1answer
123 views

Is doing some work for credit worthwhile?

Not sure how to title this as it's not just about that. But suppose that there is a software like .NET BCL, and you notice some places where you can make things much faster. It's not a great example ...
3
votes
2answers
462 views

Methods to identify and resolve memory leaks in the JVM

As the data is migrated via the object level, there has been a slow upwards trend in memory usage. I can see the periodic gc activity, but the memory trend is still going up slowly. I have currently ...
1
vote
2answers
326 views

How fast should a Python factoring script be?

Just how efficient is "good enough" for all intents and purposes? I wrote a script to simply list off all numbers that divide into an input, x, as pairs (i, n//i) and was just curious how efficient I ...
9
votes
3answers
3k views

Java Heap Allocation Faster than C++

I already posted this question on SO and it did ok. It was unfortunately closed though(only needs one vote to reopen) but someone suggested I post it on here as it is a better fit so the following is ...
1
vote
6answers
785 views

Benchmark of asynchronous code

Asynchronous programming seems to be getting quite popular these days. One of the most quoted advantages is performance gain from removing operations that block threads. But I also saw people saying ...
1
vote
3answers
460 views

Add javascript to all pages (for caching), or only to the pages that require the scripts (for a smaller page size)?

I'm using bits of javascript on my website for an image gallery, smooth scrolling, etc. These scripts are not used on every page (not every page has an image gallery for example). However, the scripts ...
0
votes
2answers
320 views

Is this a good measure of PHP script usage of the system?

I've been trying to see a way to get a measure of how much a PHP script costs of memory to the server. Well, I've found some solutions out there that requires some software to make tests and even ...
1
vote
1answer
216 views

Improving the efficiency of containers with dynamically allocated objects

This is not strictly related to C++ but its type system serves to illustrate the problem well. Assume: We have a generic template Container<T> (such as a std::vector<T>) which stores an ...
2
votes
3answers
275 views

Will object reuse optimize this often-called function?

Suppose I have a function that I need to call a lot, maybe a few thousand times on every mouse down or mouse move. It uses an instance of a function (class), called Transform: function func1(a, b, c) ...
10
votes
7answers
433 views

When to start thinking about scalability? [closed]

I'm having a funny but also terrible problem. I'm about to launch a new (iPhone) app. It's a turn-based multiplayer game running on my own custom backend. But I'm afraid to launch. For some reason, I ...
1
vote
2answers
184 views

When to really focus on performance?

We've just finishing up the first release of a database driven web application, which is now in regression testing. The application has an advanced search with many different filtering criteria. When ...
0
votes
1answer
400 views

Python — Time complexity of built-in functions versus manually-built functions in finite fields

Generally, I'm wondering about the advantages versus disadvantages of using the built-in arithmetic functions versus rolling your own in Python. Specifically, I'm taking in GF(2) finite field ...
1
vote
2answers
755 views

Static vs. dynamic memory allocation - lots of constant objects, only small part of them used at runtime

Here are two options: Option 1: enum QuizCategory { CATEGORY_1(new MyCollection<Question>() .add(Question.QUESTION_A) .add(Question.QUESTION_B) ...
5
votes
2answers
359 views

Structuring Access Control In Hierarchical Object Graph

I have a Folder entity that can be Moderated by users. Folders can contain other folders. So I may have a structure like this: Folder 1 Folder 2 Folder 3 Folder 4 I have to ...
8
votes
3answers
548 views

When is it a good time to reason about performance in Haskell?

Simon Peyton Jones himself recognizes that reasoning about performance in Haskell is hard due to the non strict semantics. I have yet to write a significant project in haskell so I wonder: can I ...
8
votes
2answers
445 views

Is there a comparative study of the memory consumption of programming languages runtimes, correlated with expressiveness and production bug ratios? [closed]

There are many comparative studies and available online when it comes to the runtime performance of applications built using one language or another. Some driven by corporations, some academic, some ...
3
votes
4answers
2k views

Server-side vs Client-side web application Performance [closed]

I am an entry level programmer with only a few months of experience. Yesterday I was discussing with a colleague how we can improve the performance of a project we are working on together. The ...
0
votes
0answers
73 views

Efficient Copy While Sorting

I have an algorithms library called NDex. I am in the process of upgrading it to a new version. Part of this upgrade involves providing two versions of many algorithms: an in-place version and a ...
6
votes
4answers
858 views

Is it a performance hit to create threads that loop a lot to check for things?

This is a generic question that I've always wondered. In general, is it intensive for a CPU to create threads that perform "while not true ..." loops or similar? For example, suppose I do: // ...
0
votes
2answers
239 views

The best way of coding web system in term of performance [closed]

So far I've been using IPB and my custom scripts all coded in PHP but I am really disappointed of the long term performance of it. I would like to move to native coding, the learning time to put into ...
-1
votes
5answers
466 views

The emperor's new code, or: how to communicate code efficiencies [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 ...
5
votes
1answer
323 views

How can I benchmark concurrent key-value stores?

I have some concurrent key-value store implementations that are implemented with hash tables and search trees that I would like to compare. I would like to benchmark them with a real world application ...
3
votes
2answers
597 views

How is it possible to build the whole codebase from source at Google scale?

The first answer to an old, recently active question linked to a video which talks about how Google repository is done. One interesting thing which was mentioned is the fact that everything is build ...
1
vote
1answer
233 views

parallel computing list of objects

I have a list of objects that all require the exact same filtering, basically a set of conditionals in a function which outputs if the object is "good" or "bad". I want to keep all of my "good" ...
6
votes
4answers
405 views

Issues to be considered while loading jQuery?

I have seen many answers in SO regarding using Google's CDN to load jQuery instead of loading it from the local server. In essence I understand this is the issue related with decreased latency, ...
0
votes
1answer
90 views

How to find the running time of an algorithm that involves heuristics

I am working with A* algorithm, in which I have a 2D grid and given two points, find the shortest distance between them, while not running into any obstruction. Now, for each cell, I find the ...
4
votes
2answers
557 views

caching on multiple servers

Because we need to keep response times low, we get tons of requests, and we need to basically process ALMOST the same data (which I'll refer to as X) each request (the inputs are different though, so ...