Questions tagged [performance]

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

Filter by
Sorted by
Tagged with
2 votes
1 answer
137 views

Does grouping threads by task improve performance?

This is kind of a lazy question on my part, since I gave up after trying only a few google terms. But when I read about multi-threaded performance, I read about context switching being bad for ...
1 vote
1 answer
2k views

Correct usage of Bluebird promise

This is related to this question on promise performance. The current top answer states that using new Promise is an anti-pattern in bluebird And that promisify should be used instead. I understand ...
1 vote
2 answers
274 views

Is using triggers best solution for this scenario

A large SQL transactional database has more than 100 tables (and it will grow). One of them is called Order. Then, there is another table WorkLoad which derives from Order and many other joined table ...
2 votes
2 answers
786 views

Line intersection detection algorithm

I'm trying to detect if a line drawn by the user intersects itself. I'm using a line intersection detection algorithm that goes through each waypoint of the line and checks if intersects with any ...
8 votes
2 answers
2k views

Is there any better approach to shortest path finding within a (vehicular) traffic network?

Dear fellow programmers, We're developing software which simulates vehicular traffic. Part of the process called "assignment" is concerned with assigning vehicles to their routes and has to use some ...
1 vote
1 answer
283 views

How to evaluate the performance of a Data Access Layer b/w two ORM's?

I am currently working on a project where I am going to replace the Data Access Layer from a custom ORM to Entity Framework.(The product is almost complete and mostly any changes that will follow ...
3 votes
1 answer
289 views

Object caching in this code too expensive?

I'm having some trouble with a game developed in Java which is kinda slow. I benchmarked it a little bit and found the problem: most of the time, the JVM is in the Object.<init>() since there ...
6 votes
2 answers
10k views

How to store data in memory(RAM) using php without using Memcache/Redis or any other software? [closed]

I want to implement a cache system in PHP consisting of following features 1) It should be able to store any(large or small) amount of data as long as the memory serves.(key value pair i.e. get & ...
0 votes
1 answer
1k views

Lucene vs Solr - Indexing pdf/word documents reisiding on a NAS drive using .Net [closed]

Using ASP.Net, I want to implement full text search using Lucene/Solr on a LARGE number of docs (word, pdf etc.) residing in a directory on a NAS drive. The NAS drive would be mapped as a network ...
14 votes
3 answers
4k views

why is the latter function 10% faster although it must create the variables over and over again?

var toSizeString = (function() { var KB = 1024.0, MB = 1024 * KB, GB = 1024 * MB; return function(size) { var gbSize = size / GB, gbMod = size % GB, mbSize = gbMod /...
0 votes
2 answers
777 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 ...
1 vote
1 answer
1k views

Windows Firewall single rule with multiple IP addresses vs multiple rules with single IP address [closed]

I've tried finding some resources to help me on my dilemma, but wasn't successful in my approach. So here goes: I am implementing an automated firewall manager for Windows Firewall which will ban ...
11 votes
2 answers
2k views

Should I prefer Python generators to lists?

Python iterators can be very memory efficient. Should I always prefer to use generators instead of just lists? In what situations should I prefer a plain array? For example instead of this: emails = ...
7 votes
2 answers
2k views

Where is the evidence for the performance of Node.js?

A lot of developers, especially ones who haven't used Node.js in production, seem to believe that Node.js is faster than other interpreted languages such as PHP, Python, and Ruby. These claims ...
5 votes
1 answer
1k 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 vote
0 answers
453 views

Reading large files for ETL program POC

I'm looking for some information on how to increase the performance of reading large text files for use in an ETL process. We're currently using a proprietary program that is more of a scripting ...
4 votes
2 answers
4k views

Best practice for uploading large file, previewing, and editing before saving to database?

I am allowing users to upload a relatively large .csv file (about 1MB) - it will contain thousands of records that each represent one of my business objects. I want the users to upload the file and ...
1 vote
4 answers
213 views

What do polynomial algorithms entail?

From here, I know it is that an algorithm that... ...is said to be solvable in polynomial time if the number of steps required to complete the algorithm for a given input is O(n^k) for some ...
1 vote
2 answers
5k views

Is it better to perform a calculation in the field's setter or have a different method?

I'm implementing a simple Quota object which determines a usage percentage based on the maximum and the used. private int maximum; private int used; public Quota(int used, int maximum) { this....
2 votes
2 answers
6k views

Is it a Good Practice to Catch All Exception? [duplicate]

The snippet below (in java) gives an example of my question. try { // code implementation here } } catch (Exception ex) { } Now,...
3 votes
2 answers
4k views

Periodically polling an API, are there alternatives?

I'm currently working on a service that is supposed to aggregate data from a number of APIs, unify the data, and offer it through another API to the users. I had a couple of ideas for solving this, ...
2 votes
3 answers
403 views

Effect of denormalizing

Here's a scenario where I'm wondering whether to denormalize a relational database (MS SQL). Text description of the requirement I have users (stored in a users table). Users belong to Accounts: ...
1 vote
2 answers
192 views

Should benchmarks (to compare processors performance) be compiled with optimization CFLAGS?

I need to compare performance of 2 processors and I concluded I should benchmark then with several various tests. I'm currently using linpack (HPL) (because it's still well known and used for ...
0 votes
1 answer
732 views

Quickly write log entries from http requests in a MySQL database with high performance

When a dataset is saved in the software I use, a http request is triggered (fire-and-forget). Information like the timestamp, the user and the changes made are listed in the GET parameters. Now I ...
3 votes
3 answers
206 views

Architecture for an event admission ticket scanner for events with multiple entries

I am working on a service that lets event organizers sell tickets to their events online (a lot like Eventbrite to be honest). The customers then print the tickets themselves (each ticket has a ...
2 votes
1 answer
572 views

What'd be better? To add one more local variable, or to call a method twice in general case?

I have the method which returns java.util.Date inside the hibernate-entity class: package ua.com.winforce.loto_partner.commons.db.entity; @Entity @Table(schema = "pr", name = "publice") public class ...
0 votes
1 answer
122 views

Reflection performance in this iteration of a (probably) large excel file

I'm wondering the performance of reflection in this situation. I'm iterating a (probably) large excel file (let's say 3000 max) which it's going to be done from time to time, and the implementation ...
1 vote
1 answer
2k views

In C#, performance wise, an object's size does matter when you access one of its members through a reference?

It may be a stupid question but in C#, performance wise, an object's size or complexity does matter when you access one of its members through a reference? Or only that specific member is all that ...
15 votes
1 answer
11k views

Log to file or to database table?

I'm developing a web application which uses MS SQL for various data: including users, user accounts, user licenses, license prices, invoices. I need to log users' real-time usage of the system, and ...
2 votes
2 answers
2k views

How does Yahoo's Smush.It work and why doesn't everyone use it?

I've recently come across an application by Yahoo called SmushIt. Apparently it does lossless compression on images. Sometimes the image size is reduced by as much as 90%. This of course has major ...
16 votes
5 answers
10k 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 ...
6 votes
2 answers
5k views

Performance and other issues with using floating point types in C++

Being interested in C++ performance programming there is one aspect I really have no clue about- and that is the implications of using floating point calculations vs doubles vs normal integer ...
4 votes
1 answer
452 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 ...
0 votes
1 answer
56 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, ...
3 votes
1 answer
643 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 ...
8 votes
2 answers
6k 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 ...
6 votes
1 answer
2k 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 ...
4 votes
1 answer
1k views

Hadoop and Object Reuse, Why?

In Hadoop, objects passed to reducers are reused. This is extremely surprising and hard to track down if you're not expecting it. Furthermore, the original tracker for this "feature" doesn't offer any ...
3 votes
2 answers
7k 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
2 answers
141 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 ...
4 votes
1 answer
2k 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 ...
-1 votes
2 answers
898 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
4 answers
858 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 ...
21 votes
7 answers
42k 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 API....
4 votes
1 answer
2k 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 ...
0 votes
2 answers
384 views

Whats a good structure to save and retrieve locations of images?

I got a java-ee application, where I collect informations about movies. Im my backend I provide data like the name, description, genre and a random uuid. I also got lots of related files, which are ...
29 votes
15 answers
3k 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. ...
10 votes
5 answers
1k 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 ...
1 vote
1 answer
366 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 ...
0 votes
1 answer
48 views

Desktop client server application, limiting text area field compromise with customers

We have a textarea field in a desktop client server application which in the end stores all the data in a database server, this text area is used to take notes and similar text areas have been put ...

1
10 11
12
13 14
17