Questions related to improving application performance.

learn more… | top users | synonyms (1)

0
votes
2answers
21 views

How can I improve this text revelation effect?

I would be glad if someone could take a look at my code and maybe improve it. It's an animation effect to gradually reveal text as if it were being decoded. I wouldn't mind if it could run with jQuery ...
2
votes
1answer
20 views

Create an alternative wait in javascript

Im creating an single page application with not reload or redirects so I display all my contents with partial view(since im using MVC4 and angularjs ) and modals. But I came with a situation, and ...
2
votes
0answers
28 views

Could this depth system for a game be improved?

I am still new to C++ and don't have a great insight on my coding yet, so I would be very grateful to anyone and everyone that gives advice. Also, this code is meant to: keep all of my objects in an ...
4
votes
5answers
95 views

cleaning up and increasing performance of js code

I would like to increase my performance of js code write a clean code... can you tell me how to do it... providing my fiddle below with js code... http://jsfiddle.net/YYg8U/ var myNumbersToSort = ...
2
votes
1answer
47 views

Very basic Context Free Grammar in Java

I wrote this program for an assignment, thus I had some requirements as far as the format of the cfg.txt file and some basic other classes that we had to use. Other than that, I am curious if there is ...
2
votes
2answers
43 views

Does this query affect perfomance?

I have this query: SELECT * FROM (SELECT u.id,u.email,u.verified,u.verified_on,u.created_on,ca.html AS age,cg.html AS gender,cs.html AS state FROM users u LEFT JOIN combo ca ON ca.combo_group='age' ...
2
votes
1answer
40 views

lexical scope v let in scheme functions

I've been chewing through a bit of The Little Schemer and the Peano examples got me thinking about operation size and time. I got some help on making Peano Multiplication linear -- however (time ...
-2
votes
1answer
25 views

Listing daemons from Linux [closed]

I have this code that lists daemons from Linux. I use /proc filesystem to get the data that I want to read: This is the file structure: /proc/24/status /proc/344/status /proc/456/status ....... ...
4
votes
3answers
80 views

Time limit exceeded in Heap

I wrote a Heap, but the judge system reports "time limit exceeded" in some tests. I use a sift_down to build, so I don't know why. Maybe I can improve the build? Or do I have a bad sift_down? ...
0
votes
0answers
48 views

Am I sorting arrays correctly as per my requirements? [closed]

Basically, my program is supposed to be completed when it's able to do: Sort the arrays which the names are starting with “sortMe…”, and measure the running time for sorting each of the arrays ...
1
vote
1answer
21 views

Is it feasible to create a syslog server which writes to a client dataset?

I'm creating a simple syslog server in Delphi XE2 using Indy's TIdSyslogServer. I've decided to make it dump into a TClientDataSet and display in a TDBGrid, but I'm skeptical about how well it would ...
6
votes
1answer
109 views

Factoring quadratic equation

First of all, I would like to say that I am fairly new to Python and programming. I started learning Python back in September and I know that I have a ton of room for improvement, which is why I am ...
2
votes
1answer
23 views

How do I use JOIN instead of IN in this query?

I need a query that results in similar products based on number of common tags. For example similar products of product A (with T1, T2 and T3 tags) should be something like this: product B | T1 - T2 ...
3
votes
2answers
29 views

log4j 1.2 - own check for verbose logs?

I got some code for review where at package level have a flag: public static final boolean LOGS_VERBOSE = false; And in worker classes (multi threaded Runnable jobs) have code like ...
1
vote
1answer
57 views

parallel.For function

I am trying to add parallelism. The following function works. For testing purposes, calculating chunckLength is fine. However, when I allocate more cores, it seems to slow down significantly which ...
1
vote
0answers
42 views

Need a better way to mass modifying css Class [closed]

I have a huge collection of list elements. the concept is that the user can select only two items from that collection. I am showing a check/Uncheck as an image infront of the list item, just for ...
2
votes
1answer
85 views

Prolog Sudoku solver taking too long

I was wondering if there's any way I can improve this code's execution. I want to use it on a 9*9 grid, but it takes too long to solve this as 4*4. This program takes as input a 4*4 matrix ...
4
votes
2answers
54 views

How to improve this algorithm for building a graphs closures

We have a large directed acyclic graph and a requirement to filter it by allowing a user to select certain nodes and then we remove all nodes that are not selected nodes, ancestors of those nodes, or ...
1
vote
2answers
54 views

Thoughts on my byte array library

Here is a small library which manages writing into and reading out a byte array. It uses TValue arrays to get and put data, its my first time using them. Its crudely written, and poorly optimized but ...
4
votes
2answers
78 views

“Edit distance” UVA programming challenge

I'm trying to solve a programming challenge for fun. The programming challenge is here and my solution for the same can be found here. It currently causes an exceeded time limit. #include ...
3
votes
2answers
88 views

Singleton holding and notifying registered listeners

Suppose I am listening for network changes with the following listener: interface NetListener { void onNetworkAvailable(boolean isWifi); void onNetworkUnavailable(); } I want to have an ...
4
votes
2answers
51 views

Performance/Optimization of Knapsack(ish) algorithm for move generation for a game

I'm writing an AI for an italian Card game scopa http://en.wikipedia.org/wiki/Scopa And as part of it i need to generate all moves available to the user. A move consists of finding cards in the ...
-1
votes
1answer
51 views

How would I improve this class in terms of responsiveness and performance?

I'm about to release this application as a hobby and I'm wondering how would I improve the speed of the calculations and overall responsiveness of the class? I have covered a module briefly in data ...
3
votes
2answers
47 views

CSS selector, performance improvement

So, I have this CSS selector: .img + *{ } Which, from my understanding, will make the browser look for all the elements and then select only those which follow an element with the class img. Is ...
1
vote
3answers
148 views

How to make this SimCity clone more efficient?

I am doing my best to keep this code clean and fast, but as I add more to the game, it seems to get harder to maintain a frame-rate higher than 200! The game is essentially a SimCity clone. I ...
3
votes
1answer
96 views

Improve speed of LINQ query

How can I improve the speed of this LINQ query? using (var txn = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = IsolationLevel.ReadUncommitted ...
1
vote
0answers
59 views

Pygame: Can someone tell me how to make this code faster?

I am working on a sim-city clone, and I am noticing a drop in frame rate as I add more objects to my map, now this is expected, but, when I fill the whole screen, the game maintains about 300 fps. ...
2
votes
1answer
62 views

Drawing a table in Python3

I have created a module to draw text tables. The relevant parts are below and here's the full code for txtable). class Row(Txtable): [...] def format(self, col_widths): """Return the ...
3
votes
1answer
42 views

Optimize Scipy Sparse Matrix Factorization code for SGD

I'm working on implementing the stochastic gradient descent algorithm for recommender systems (see Funk) using sparse matrices with Scipy. This is how a first basic implementation looks like: N = ...
1
vote
1answer
49 views

Increase efficiency of card-ordering program

As mentioned in @rolfl comment. What this program does is that it "resequences the cards using a fixed system and count the number of times the resequencing happens before the output is the same as ...
8
votes
2answers
233 views

Python around 40 times slower than c++

I was implementing a rolling median solution and was not sure why my python implementation was around 40 times slower than c++ implementation. Here are the complete implementations C++ #include ...
0
votes
1answer
69 views

Processing a string from the console

How can I make this program run faster? On enter, I have a string from the console. For example: 1 1 7 3 2 0 0 4 5 5 6 2 1 On exit, it will be 6 20 Could you recommend a way to make this run ...
3
votes
2answers
54 views

Trying to find a better way of finding something rather then looping through list from top to bottom.

I am having a slight issue here, i am trying to think of a faster way of finding two elements from 2 different lists that match. The problem is that if i have lists which both have 1000 elements ( ...
7
votes
2answers
301 views

Perfect Hashing Implementation

I'm building a hash table for this problem: Implement a class for storing a set of integers: class FixedSet { public: FixedSet(); void Initialize(const vector<int>& numbers); ...
2
votes
1answer
90 views

Barnes-Hut implementation of the N-Body problem translated from F# to C#

I am after a peer review of a C# implementation of the Barnes-Hut algorithm which I have translated from F#. The F# version is the base for comparison, therefore the C# version is suppose to reflect ...
4
votes
1answer
105 views

Improving performance when sorting array of structs by multiple fields

I have an array of a struct containing 5 byte values. I need to sort this array by each value in a different order depending on the situation. These arrays are sometimes quite small (10-30 elements), ...
4
votes
6answers
129 views

which of these 2 blocks is better?

I am looking for some opinions about these two block of code. They do the same thing, they are just written differently. Which one you recon is "better", "faster", more "readable", gives you more ...
6
votes
7answers
484 views

Reading Large Files in Java getting really slow

I am trying to read a large file ~200 MB (~300 million lines of text). I am using a relatively standard way of reading like: for (int i = 1; i <= numProcs; i++) { System.out.println("Parsing ...
5
votes
2answers
107 views

Looking for performance suggestions in Noise algorithm

I believe this is considered value noise or possibly gradient noise in that I simply interpolate between random values (always returning the same values per coordinate). I am using this currently to ...
1
vote
1answer
70 views

Number of CSS classes for one element

My project uses at least 100 helper classes like the below: .pa5 {padding:5px} .pa10 {padding:10px} /* ... */ .pt5 {padding-top:5px} .pt10 {padding-top:10px} /* ... */ .pr5 {padding-right:5px} .pr10 ...
5
votes
1answer
183 views

Performance: equivalent C and C++ programs

I write quite a bit of code in C, but haven't done much C++ since my college CS classes. I have been revisiting C++ recently, and thought I would re-implement a program I had previously written in C, ...
2
votes
3answers
130 views

Improving speed of word search algorithm

I've been working on this word search algorithm and had some issues about its speed. It kinda looks like it takes a little too much time. If anyone could offer suggestions on making this better and ...
0
votes
1answer
45 views

How to reduce runtime of gene data processing program?

This program takes a huge data set as input, processes it, calculates and then writes the output to an array. Most calculations may be quite simple, such as summation. In the input file, there are ...
3
votes
1answer
27 views

Get Ancestor Class Name that Defines CONST in PHP?

I have a class hierarchy in PHP and in some of the parent classes I have defined a constant, let's assume that constant is called TYPE for my example. I want to be able to pass in a valid value for ...
3
votes
2answers
144 views

Improving run-time and max-digits of digit summing code

As a challenge I decided to do the following problem: How many different numbers with n digits are there whose digits add up to k As this is an embarassingly parallel problem I decided to use a ...
1
vote
2answers
119 views

Performance: getting first value from comma delimited string

I've got a string that has values that are delimited by comma's, like so: $var = '1,23,45,123,145,200'; I'd like to get just the first value, so what I do is create an array from it and get the ...
5
votes
1answer
241 views

Solving 15 puzzle

I'm trying to solve 15 puzzle using A* algorithm, but something really bad goes on in my get_solution() function that ruins performance. I guess there is a too much usage of maps in here, but I don't ...
0
votes
1answer
60 views

Performance of autofit text method (using Imagick) is horrible, unfortunately

I've hacked a method that auto-fits text into an Imagick image, given a bounding box: the image's width (minus optional margins) and a certain maximum height. What it does is find the optimal font ...
2
votes
1answer
47 views

Is a Recursive-Iterative Method Better than a Purely Iterative Method to find out if a number is prime?

I made this program in C that tests if a number is prime. I'm as yet unfamiliar with Algorithm complexity and all that Big O stuff, so I'm unsure if my approach, which is a combination of iteration ...
3
votes
1answer
75 views

Optimize regex for maximum speed

According to http://stackoverflow.com/questions/19608546/optimize-regex-for-maximum-speed and comments to ask my question here . Please help me to optimize following regex to best performance . I have ...