Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [performance]

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

0
votes
3answers
98 views

Should I reuse a predicate for multiple IEnumerable checks

In a long running Windows Service I have a custom thread pool manager that has a loop which continuously looks through a couple lists for idle threads. Given multiple uses of the same predicate, is ...
-4
votes
2answers
140 views

Performance question - what are the defects of high level programming languages and compilers that makes assembly still a better choice today [closed]

What I want to know is, how can we still make use of assembly today, in productive manners? When assembly outperform C, so it would seem practical to write a section of the project in assembly rather ...
0
votes
0answers
50 views

Challenges in Consuming Slow API's

We need to integrate a chatting software in our web application (and mobile app). The chat software could be accessed by our users from outside of our application too. The integration goal is to let ...
1
vote
0answers
26 views

User level customised activity feed design

I am working creating api for activity feed of user. Feed contains different type of entities. Before that let me give you bit overview about the app. Its a video app where Users can ask questions ...
1
vote
2answers
116 views

When using an ORM when should I sacrifice performance for convenience?

I work with SQL Alchemy a lot and, as a "lazy programmer", I enjoy the convenience it offers. But the "diligent programmer" in me often worries about optimisation and the performance of the queries ...
13
votes
7answers
680 views

Saving high-frequency events to a connection-limit constrained database

We've got a situation where I have to deal with a massive influx of events coming in to our server, at about 1000 events per second, on average (peak could be ~2000). The problem Our system is ...
106
votes
14answers
14k views

When to optimize for memory vs performance speed for a method?

I recently interviewed at Amazon. During a coding session, the interviewer asked why I declared a variable in a method. I explained my process and he challenged me to solve the same problem with fewer ...
0
votes
1answer
105 views

Security and performance considerations when creating chat system on a Flask backend

I am building a website with the Flask framework. One functionality of the site will be that users can send messages to each other. I created a prototype of this using Flask WTF forms. The basic ...
1
vote
2answers
173 views

How to benchmark software performance under same conditions (RAM, CPU caching etc)?

I am writing a software that splits big files into smaller files and I have coded several solutions. I am measuring the execution time of each of my solutions. (with threads, go routines, MPI etc) ...
1
vote
1answer
93 views

When is creating a supplier for an object less expensive than creating the object itself?

Objects contains 2 method overloads where one takes an object and the other takes a Supplier of that object: public static <T> T requireNonNull​(T obj, String message) public static <T> T ...
2
votes
1answer
79 views

If you can store BigInts in a more optimal way than an array

This suggests just storing BigInts as an array: // n = -123 var n = { sign: -1, digits: [3, 2, 1] }; However, if you have "big ints", that array will get large: var n = { sign: -1, ...
2
votes
0answers
64 views

Performance: Creating duplicate file

I have a Web server (Local) and File server(Remote). I need to create a duplicate of an xml file in the same location with different file name in the File server. The size of the file is random, but ...
1
vote
1answer
49 views

Better to store miscellaneous metadata in database or calculate on each access

I have a number of attributes I need for various page loads and other backend tasks, and I'm debating on whether storing these things in a database or calculating them on the fly. For instance, if ...
0
votes
1answer
67 views

Logic circuit simulation: homebrew or third party solution?

Software I'm working on requires simulation of logic circuits, both combination and sequential. Now the simulation doesn't need to be too detailed, in fact it could be detrimental to the function of ...
1
vote
3answers
50 views

Calculating Journey Summary made by a vehicle and Cache them to database

This is more of a point me in the right direction kind of question, I have 2 solutions but both of them are invalid because the data calculated is invalid in some scenarios. I am working on a system ...
0
votes
1answer
115 views

Simple but frequently throwing vs reasonable but rarely throwing vs complex but never throwing [duplicate]

A lot of code that's designed to convert or parse some data of type Foo into a Bar is written with the assumption that one wouldn't intentionally pass it invalid inputs. As such, it assumes that ...
7
votes
2answers
574 views

How did heavy software in the early days managed to run on 4MB RAM computer? [duplicate]

It's no secret that in the early days of computers, they had only 1-4MB of RAM. I found an article stating you needed only 4MB of RAM to run Word, Excel and PowerPoint simultaneously. How was that ...
1
vote
2answers
1k views

Why should I use foreign keys in database? [closed]

In my 10+ years of experience in the IT field, I have never used foreign keys in any of my project and I never felt the need. I did work with professional databases which had foreign keys constraints. ...
2
votes
2answers
597 views

How do I avoid increased memory consumption by browser and performance degradation when dealing with many records?

In my MVC 5 web application there are many instances in which users will require to view thousands of records within grids, now I managed to get around many performance related issues by utilising the ...
1
vote
2answers
166 views

High Performance Garbage Collection

I am new to garbage collection but have been looking around. I have noticed that Reference Counting has a very bad reputation (PHP, Python), as well as Conservative GC (Ruby) under certain conditions. ...
0
votes
1answer
162 views

Would Cython-like “Cypescript” be a feasible idea?

Cython is a superset of Python that can be complied into C modules that can be imported and used normally in Python code. This can be used to speed up parts of a Python program. In a recent project, I ...
-1
votes
1answer
31 views

Tolerated Performance when generating a document from SQL

Is it acceptable for a framework to generate an XLS document of more than 300k rows and 6 columns in 2 minutes? This framework took 2 minutes to generate the document while fetching data from a local ...
3
votes
1answer
343 views

ToList() vs Using default list constructor

After reading rules of Clean Code, one of them is to use default constructor when using transferring data from one collection to other. For example i have : Dictionary<string, string> dict = ...
3
votes
1answer
233 views

Are design principles of functional programming languages and current hardware (register-machines) contrary?

Functional languages seek to minimize accidental state (computationally-convenient but logically unnecessary data dependencies) by endorsing the most granularly modular, mathematically unambiguous ...
0
votes
1answer
167 views

How to load test Publisher/Subscribing queue?

I am trying to load test a queue that works on a pub sub pattern and can't figure out how response time is to be calculate and the TPS(transactions per second). Problem statement : The pub sub ...
2
votes
1answer
143 views

Is it a good idea to release an application with custom performance counters?

I have been reading on C# Performance Counters and I was wondering if I should be keeping them in my release build? I have never encountered an application that has it's own custom performance ...
-1
votes
1answer
22 views

Cursor select on 2nd Primary key on db2 sql field for embedded positional value - Unable to determine most efficient for longterm design

I have a SQL DB2 table where the first two fields are the primary keys (not including the third field which is date/time stamp). The table was designed by another team with the intent to make it ...
-2
votes
1answer
122 views

Avoiding multiple calls to SQL and persist data

I often received messages objects and for each of them I need to query the database in order to achieve some additional information from one database table. Since we are performing many requests to ...
0
votes
2answers
123 views

Exponential Growth of Scope of C++ Projects

I've been coding in C++ professionally for six odd years, and it's my go-to language for performance-critical projects. When working to a deadline, the scope expands to fill the time available. ...
0
votes
4answers
177 views

Improvements in java based test framework to reduce execution time

Let me give a bit of background on the problem. We have a java application which has MQ integration and an Integration Test pack which is also written in java. The test pack runs all scenarios (...
1
vote
1answer
608 views

Why is one way data flow (eg. React, Vue, Angular) faster than two way data binding with dirty checking?

I understand that two way data binding can be expensive and slow. For example, imagine a toy grocery list app that lets you list grocery items and their prices, and shows you the sum of the prices (...
9
votes
3answers
1k views

Reasons behind non-intuitive C# String.Split() implementation

In C# if I want to split a string by another string I have to do something like that : testString.Split(new string[] { "anotherString" }, StringSplitOptions.None); From the overloaded String.Split ...
0
votes
0answers
130 views

Best way to reduce memory consumption on persisting Java objects

Let's say I have an application that maintains relationships between objects - think of a parent-child relationship tree. The lineage of these objects are critical, so maintaining references from ...
1
vote
1answer
89 views

How can I model unknown and an unknown number of attributes on an object?

My example might be slightly contrived, because I've modified it so that the project isn't recognizable by my employer. I'm a newer developer at a very small company. We have an object - Posts - that ...
0
votes
3answers
357 views

Global state variables vs constructor parameter passing

A couple of readonly variables will be used. Almost all of the classes will be using those variables. Either I place all of the variables in a separate internal static class or I pass them on ...
0
votes
0answers
18 views

Better Approach for Expanded RecylerView

I want to make below-mentioned expanding Layout inside RecylerView. This is how it looks when it is not expanded. You can find the source code of Expandable RecyclerView in my GitHub repo here. Now ...
-2
votes
1answer
39 views

pixels aside, how to cross the uncanny valley of hybrid apps? (performance)

I see the top drawbacks of hybrid (webview/dom) apps, compared to native, as the following, in order time to startup/launch smooth frame rates (no jank) responsiveness to input, instantaneous are ...
1
vote
1answer
342 views

Chat application - write to file and then save in database

I have followed this approach that is described here to implement a simple chat application: https://code.tutsplus.com/tutorials/how-to-create-a-simple-web-based-chat-application--net-5931 I'm ...
0
votes
1answer
33 views

Assembling random indexed packages into an ordered sequence(s)?

I am pretty confident that this is well-known and solved problem. Suppose there are n uniquely indexed "packages" randomly getting into single entry point like .AcceptPackage(Package package). ...
2
votes
2answers
200 views

Reading huge (up to 32 GB) file in multithreading env?

Goal: 1) huge file read in chunks each 1 MB long, 2) each one gets compressed and written to an another output file. Note: I am limited to .Net 3.5 only. Is there a known pattern how to parallelize ...
5
votes
4answers
336 views

Optimal Immutable Data Structure for Highly Dynamic Particle System

Trying to see if immutability is a good fit for highly dynamic objects like game entities (that constantly are moving around and changing) or particle systems, each which might have thousands or ...
2
votes
4answers
395 views

Designing database for a table with huge number of rows

Suppose, I am developing an application to keep track of daily sales of of a small retail shop of only three employees. Suppose, the owner agrees to buy only one PC, and, refuses to purchase a copy ...
1
vote
1answer
122 views

What tools exist to determine the speed up a GPU will have on an algorithm?

Basically, I am wondering what sort of speed I will get by parallelizing a algorithm to work with GPUs. I am wondering if someone has implemented queueing theory/Amdahl's law with a UI or if everyone ...
0
votes
3answers
71 views

Performance on highly filterable web pages

In our application we have a page were we list our entities with many options to filter and to search. Over time this page got slower and slower especially for large datasets, so we thought about how ...
-7
votes
1answer
118 views

Writing tool to make large number of http requests with sub second accuracy

I'm pondering a project in which one component needs to make a large number of http requests at accurate times. It should, let's say, release a set of 'dozens to hundreds' of requests at 1 second ...
1
vote
1answer
105 views

Direction to take to improve a AST interpreter

I'm looking for some opinions/advices about a particular subject. Here is the situation : I'm developing for fun, in my spare time, a programming language interpreter made in C# and I'm looking for ...
1
vote
0answers
148 views

How to Investigate the difference between query execution times?

I have a simple query, when executed directly in SQL Developer Studio (It's an Oracle Database) takes around 4 seconds. But when executed via my Java code it takes around 20 seconds. I'm using ...
3
votes
5answers
370 views

Is there a practical benefit to using the smallest datatype possible?

In C# (and other languages), we can define a numerical variable as a short, an int, or a long (among other types), mostly depending on how big we expect the numbers to get. Many mathematical ...
1
vote
1answer
247 views

System Design: Chat Application and Polling

What would be the best way to add chat feature to an android, ios, and web app? Is polling really as bad as people say? The requirements are user to user messaging and chat rooms. Here is my thought ...
0
votes
0answers
167 views

Scoped beans as dependencies - Use proxy or make it dependent/prototype scoped?

Regarding overall performance, when used as a dependency of a higher scoped bean, is it better to downgrade a bean scope to prototype or dependent instead of using proxies? Consider a scenario where ...