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
2answers
87 views

Class design, responsibility granulation, efficiency and performance

I am in a design dilemma. I have a set of data that can be interpreted in numerous ways, but I cannot really decide how finely grained should it be. To illustrate it with some simple code: class Base ...
1
vote
2answers
58 views

Monitoring a web service

I don't know how to phrase this question properly so please feel free to suggest edits. I've helped develop an in-house RESTful service for a company I'm working for, and it seems to have hit a wall ...
-5
votes
2answers
85 views

Does CPU need local cache if Intel and Micron 3D XPoint is used? [closed]

As Intel and Micron stated, the new 3D XPoint RRAM is 1,000 times faster than NAND. See link here. From speed perspective, does CPU still need L1 cache if Intel & Micron 3D XPoint RRAM is used as ...
6
votes
3answers
349 views

Fine Line: Readability Vs Speed [duplicate]

Is there a line between readability vs compile or processing speed? Aside from the extreme cases, I wouldn't think it would be even worth saving that little bit extra in favor of legibility... For ...
-1
votes
0answers
20 views

Compromising performance for code readability and developer convenience [duplicate]

This could be a highly subjective topic without a definitive answer, which I am not looking for, only perhaps some anecdotal accounts as well as general guidelines that one might follow. ...
10
votes
3answers
4k 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 ...
1
vote
1answer
71 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 ...
1
vote
4answers
2k 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
votes
0answers
35 views

How do I optimize my Sudoku solver written in ruby to run in less than 10 seconds? [migrated]

I wrote the sudoku solver solution below. All the test cases pass except on of the test case which runs > 10seconds. What can I do to make my solution faster? def in_row(grid,i,k) ...
0
votes
1answer
75 views

Performance of sharing single object with multiple threads in Java

In Java, if I create an object that has a method to do something, and I pass that object to multiple threads which call the method, is there a performance difference from creating an individual ...
4
votes
3answers
135 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
1answer
60 views

What's an effective threading structure for NIO and server performance in C/C++? [closed]

I run into this issue where if I do a read to check for data too often, my CPU skyrockets, and if I don't check often enough, it's slow for client performance. What's an effective way to deal with ...
2
votes
1answer
104 views

sort multidimensional array recursively - is this reasonable

In a nutshell, I needed to traverse any number of dimensions of a multidimensional array (or not) and I wanted the process to be as predictable as possible (in order to proliferate the pattern ...
0
votes
1answer
183 views

Immutable class with behavior

I've just finished Effective Java and I loved it. I'm trying to refactor one of my programs to take advantage of what I've learned, and I have a lot of questions regarding immutability. My program is ...
3
votes
3answers
143 views

Do microservices scale down?

I've been reading up on microservices architecture, which gained a lot of recognition in recent years. As a big fan of UNIX philosophy, I find it very clean and sensible. However, exisiting ...
0
votes
1answer
50 views

PHP MVC concept large controller

I have custom MVC framework in PHP and my controller file has about 5000 lines. The question is, is it a big concept flaw? It is structured code with kiss method and quite maintainable. Are there ...
13
votes
10answers
1k views

Does low latency code sometimes have to be “ugly”?

(This is mainly aimed at those who have specific knowledge of low latency systems, to avoid people just answering with unsubstantiated opinions). Do you feel there is a trade-off between writing ...
2
votes
1answer
64 views

How do I handle long running third party calls from backing up my message queue?

Here is my exact scenario. I must make requests to a third party service The service takes ~15 seconds to respond It also has no webhooks or any call back mechanisms These requests are not made ...
21
votes
2answers
2k views

Is there a performance benefit to using the method reference syntax instead of lambda syntax in Java 8?

Do method references skip the overhead of the lambda wrapper? Might they in the future? According to the Java Tutorial on Method References: Sometimes... a lambda expression does nothing but ...
6
votes
1answer
713 views

Is event sourcing ready for prime time? [closed]

Event Sourcing was popularized by LMAX as a means to provide speed, performance scalability, transparent persistence and transparent live mirroring. Before being rebranded as Event Sourcing, this type ...
2
votes
1answer
94 views

In C#, is it good practice to use implicit numeric conversions from int to float?

For example: if(5.0f > 1) { } Does it have a significant performance penalty? Compared to just doing if(5.0f > 1.0f) { }
2
votes
3answers
274 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 ...
1
vote
2answers
91 views

Caching query results vs Querying each time (finding a middle ground)

This is kind of an expansion on a previously asked question Some background info: Querying Over 5,000 items from SQL database that eventually get sorted into a list depending on who the user ...
0
votes
0answers
41 views

BCMath vs MySQL: performance

Scenario I am working on a web application that handles financial transactions, and my code will need to be reusable for everything from consumer carts to manufacturer/distributor shipments. The ...
-3
votes
1answer
92 views

Java - Best way to set properties of an object [closed]

I don't know if there is any difference in performance, or its just a matter of choice, but I am a perfectionist like that, and I'd like to know. Lets say you have the object HolySheet. You can set ...
3
votes
4answers
1k views

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

An interviewer asked me this question: Tables are created with appropriate normalization rules, However the database is performing slow. [Ie.: The select, insert statements are taking time to do ...
1
vote
4answers
2k views

Best resources to really understand run-time complexity [closed]

I'm familiar with the basics of run-time analysis such as what makes certain types of code O(n) and O(n^2). But I'm having real trouble learning, understanding, and really remembering how to analyze ...
2
votes
0answers
60 views

Truncating HTML content at specific content blocks

I have HTML content in my DB and I would like to present a list of these individual items but truncate each of them so they're not fully displayed. I would like to keep truncated items ...
7
votes
2answers
2k views

Does LINQ require significantly more processing cycles and memory than lower-level data iteration techniques?

Background I am recently in the process of enduring grueling tech interviews for positions that use the .NET stack, some of which include silly questions like this one, and some questions that are ...
18
votes
7answers
10k views

Why is NoSQL faster than SQL?

Recently I was asked: Why is NoSQL faster than SQL? I didn't agree with the premise of the question... it's just nonsense for me personally. I can't see any performance boost by using NoSQL ...
6
votes
2answers
329 views

How does the Hip hop virtual machine (HHVM) theoretically improve PHP runtime performance?

From a high level, how does Facebook, et. al use to improve PHP performance with the Hip Hop Virtual Machine? How does it differ from executing code using the traditional zend engine? Is it because ...
8
votes
3answers
1k views

What is the best way to keep track of the median?

I read a question, and I'm looking for input on how to solve it: Numbers are randomly generated and stored into an (expanding) array, How would you keep track of the median? There are two data ...
5
votes
1answer
283 views

Kth selection routine - Floyd Algorithm 489

I have recently come across a promising Kth selection routine that reportedly outperforms quickselect the Floyd, Rivest Select routine. This Wikipedia article provides a pseudocode version which I ...
0
votes
0answers
32 views

Where to generate View?

I plan to build a CRM for small companies. It is supposed to be a single-page application. Now I am unsure where it is more efficient to convert the data to HTML. Should I rather do it on the server ...
61
votes
15answers
14k views

Why would it ever be possible for Java to be faster than C++?

Sometimes Java outperforms C++ in benchmarks. Of course, sometimes C++ outperforms. See the following links: http://keithlea.com/javabench/ ...
0
votes
1answer
66 views

How to handle rating? [closed]

I want to implement like/dislike system, but I don't know how to achieve best performance. I have to tables: blog posts and comments that need rating. Should I store all data in one rating table? Or ...
3
votes
5answers
226 views

Term for Performance Issues Due to Looping [closed]

Is there a term for performance issues caused by someone creates a loop that performs hundreds or thousands of actions that could have been done in bulk? My example is that I keep running into loops ...
3
votes
1answer
259 views

How to communicate inefficiency before it's implemented?

This is a problem I come across pretty often. Basically we are using an application to make art content. Often times this requires writing custom tools for it. Sometimes you run into parts of the ...
16
votes
3answers
11k views

Is there any reason to use varchar over text columns in a database?

Is varchar just a remnant from before text came around, or are there use cases where you would want to use a varchar? (Or char for that matter..) (I use Postgres and MySQL (MyISAM) daily, so those ...
1
vote
1answer
47 views

Performance and data retrieving

I'm currently developing a mobile application in Objective C for iOS devices. While doing the application I reach the point where I have to retrieve data from a database and show it on a table (the ...
10
votes
9answers
888 views

Is it appropriate in a developer's job description to have “error free” as a key output? [closed]

As part of a review of all job descriptions, my company has decided to include the following as a key output: website development completed on time, within specification and error free Given ...
2
votes
4answers
433 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) ...
1
vote
1answer
100 views

When the result set doesn't matter should Left Join or Inner Join be used

When you have a query where you're joining from a non-null foreign key to the foreign table it doesn't matter if you use LEFT JOIN or INNER JOIN from a result standpoint (since there won't be any ...
2
votes
1answer
587 views

How many Angular Controllers and/or Directives is too many?

I'm building a large, editable data table with angular, and I'm trying to figure out what the best practice is. The table will be a couple of hundred rows, with a couple of dozen columns, so upwards ...
2
votes
1answer
70 views

How do hybrid interpreter-JIT compilers work?

Chrome's V8 compiler, the Java HotSpot compiler, and many more have multiple tiers of interpretation and compilation. A function starts off as interpreted in HotSpot and then, if it is run often ...
4
votes
1answer
363 views

Is Collection.stream().filter().forEach() inefficient compared to a standard for each loop?

IntelliJ IDEA recommended to me just now to replace the following for-each loop with a Java 8 "forEach" call: for (Object o : objects) { if (o instanceof SomeObject) { ...
0
votes
3answers
115 views

What is the explication for the difference execution time for the same instruction?

As you know when we run instruction in our code like long a = b; we will not have the same ticks each to be executed. first exeution it take 2ticks; second exeution it take 3ticks; third exeution it ...
3
votes
5answers
203 views

Should I use BLOB or Tables for storing large data?

Problem Currently investigating a solution to improve the performance of a web application. The application works well for small projects, but faces performance issues in the UI when working with ...
-3
votes
1answer
111 views

Java - Concept question: LinkedHashMaps vs POJOs? [closed]

EDIT: I'm just going to ask a single question instead of presenting a problem and asking for advice on a specific design decision in the solution. Given a batch of data from a database, collected ...
2
votes
2answers
191 views

Will using multiple recordsets in one database request be more efficient?

I am redeveloping an old ecommerce website which is currently written in C# ASP.NET 2.0. Because this is a reasonably high volume website and has suffered performance issues I want to develop in the ...