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
0
votes
1answer
28 views

How to add APM/observability/tracing in a monolithic architecture?

I keep reading articles analyzing Monitoring and Observability, or having lots and lots of text regarding how the latter is the extension of the first, or how they are complementary, or how tracing is ...
-5
votes
0answers
54 views

Advice for Intermediate/Advanced C++ Developer

First and foremost I must say that I am in debt to whoever uses his time to provide helpful advice to this post. I think we have a wonderful community and it is thanks to people like you reading this. ...
1
vote
1answer
54 views

How to segregate blog posts into seen and unseen?

Imagine an app like Instagram/Reddit with a feed of posts. Problem: We want to show users posts they have not seen before. When the user first opens the app, we retrieve 30 latest posts from the ...
1
vote
3answers
99 views

How to make Request from Client to Server more evenly distributed (over 24 hrs)

I'm trying to write a new API that can support many devices. There will be at least 50k devices in the beginning that will connect to the server using an HTTP API on a daily basis to receive updates. ...
4
votes
3answers
275 views

How can adding redunancy adversely affect performance

I have been reading about system design and was going through this popular article - A Word on Scalability The author here says: An always-on service is said to be scalable if adding resources to ...
5
votes
4answers
330 views

Processing a 2D matrix - need to speed up my O(n^4) algorithm

I have an n x n matrix which I need to convert into a list sorted by value. Starting with the maximum value cell at (row x1, col y1), I must immediately exclude all cells where (x >= x1, y <= y1)...
0
votes
0answers
44 views

Handle big data sets in a web application in combination with real-time communication between web-clients

We have the following use case to be developing: A web application that shows a data table / data grid with up to 100000 rows and 30-50 columns. Each column is filterable and sortable. The web ...
2
votes
2answers
222 views

How do modern JS engines terminate unresponsive scripts?

I'm trying to implement a safety feature that puts a timeout around a huge function call. Pretty simple, I thought, but it turned out much harder than expected; there's no built-ins for this in any of ...
-2
votes
2answers
109 views

Apply Agile to the letter [closed]

I often see Agile methodologies applied to the letter, some project managers use dogmas and do not question them. Can we say that Agile is first of all flexibility of application and freedom of ...
-3
votes
2answers
66 views

Default assignment before if-elseIf or within if-elseIf-else , What is better in terms of performace/optimzation? [duplicate]

I have a piece of code where I need to assign a value to a variable, but base on condition, it could take other values. It can be done in multiple ways, but need to know which would be preferred in ...
1
vote
1answer
135 views

How to exchange rectangular arrays via HTTP efficiently and without tightly coupling requesters to responders?

Suppose a user defines input arrays on a JavaScript frontend. These are sent to a Python backend via the REST API. The backend computes a result for every combination of each array's elements. It ...
20
votes
6answers
4k views

Using a different algorithm depending on the size of the input

I recently finished a course on advanced algorithms, and another on complexity & computability theory, and in the past few days my mind has been somewhat preoccupied by this question. Why don't we ...
-4
votes
1answer
115 views

How do they make programs so lightweight?

I was checking out a sample project of NetBeans IDE called "Stopwatch". Then ran it! Then I opened TaskManager to see how much RAM it uses. It was using ~110MB. Then I opened the "...
1
vote
0answers
45 views

Stuck on approach on how to serve a lot of data to users with a lot of possible combinations

So, I'm making an application which monitors specific things that happen within the area of a user. And I'm really stuck at the approach on how to serve specific real-time data to my users. I am using ...
1
vote
4answers
647 views

Can writing Object-Orientated Code in a Functional style improve performance?

Given a scenario where you have consecutive setters or a series of events where an object is modified, can it be more performant to instead write code in a way where a new state is returned rather ...
-3
votes
2answers
178 views

Which hash algorithm is best for speed and identical hashes. (a lot of collisions)

I'm searching an existing hash function or trying to make a hash function that has a lot of collisions. Regularly a hash is used for it's ability to create unique hashes for hash tables or security ...
2
votes
2answers
128 views

Entity delete validation in a microservice environment

In a microservice environment there are two services: Service A and Service B. Service A manages an entity called x which has one to many relationship with service B's entity called y When a network ...
0
votes
3answers
308 views

Is a transaction time of <10ms for an SQL database viable? If so, under what conditions?

Appreciate this is a rather odd question, so I will try to clarify as much as possible. Please also be assured this is a question purely for my own education, I'm not about to rush off and do crazy ...
2
votes
2answers
212 views

Designing distributed invoice number counting system

I am looking for a way to design a system that can provide a linear and incremental counting for invoice number accros a scalable system. At this time, I have four pools of two servers (two pool for ...
3
votes
5answers
283 views

How can billion integer ids be stored and specific ones checked for existence most efficiently? (persistent solution, not just in-memory)

Let me preface this by saying that I am familiar with RDBMS. I have a solution using mysql/mariadb but I am not happy with the efficiency of the solution so I'm looking for alternatives. I'm trying ...
3
votes
3answers
297 views

How does a CDN get “data” when there's hundreds of terabytes stored in data centers?

I am still trying to wrap my head around CDN's in a real world scenario. Suppose I am building a Netflix clone. I have about 1,000 terabytes of video content stored in an S3 bucket. Since Netflix ...
0
votes
2answers
139 views

Is it good practice to throw exceptions in parsing functions

I basically read across the entire internet that exceptions are bad, slow and should be avoided whenever possible. This confuses me because I thought I have a "valid" case to use exceptions. Consider ...
1
vote
5answers
956 views

Is using 64 bit integers (long long) faster than less bits ones?

I read in the book "Game Engine Architecture" by Jason Gregory that: "It’s possible to access data items that are narrower than the width of a machine’s data bus, but it’s typically more costly than ...
0
votes
0answers
91 views

How can you multithread an html parser [ in C++ and similar languages ]?

Ive done two HTML parsers. Done with Regular Expressions [that accounted for nesting]. It was quick, but error prone. Done by evaluating Character by Character through switches. Here was the basic ...
-4
votes
1answer
51 views

application can not handle certain amount of RPS when 3k+ sessions connected

i have a problem in my scalable Pub/Sub application that it can not take more than 30 RPS when big amount of sessions are open against it. first i will explain the application structure. the ...
0
votes
1answer
35 views

In Redux is it better for performance to add a property to the items in the store or to calculate it in the container?

I'm writing my first Redux app. In my store, I have ~300-500 Island objects that I retriev from an API and index by an id string in an object (being treated like a map). When I'm editing one of ...
-6
votes
1answer
56 views

Are aspects of domain driven design limiting when we scale?

From what I have read about the domain driven design, an aspect of it is that there is a clear separation between domain objects and DTOs. So the application level components deal with domain objects ...
1
vote
2answers
98 views

How to model combinatorial information in RDBMS

I need to model the persistence of combinatorial information. For example, suppose that the combination of 3 attributes (A, B, and C) are used to reference a given product. Besides that, supposed that ...
-1
votes
1answer
75 views

How does a robust http server handle requests?

I have written many http(s) servers in Node.js and just take for granted that I can receive many requests and all IO operations are async. However, now I would like to try and implement an HTTP server ...
-2
votes
1answer
112 views

Trouble Designing Programs in VBA

I am new to VBA and am struggling with overall program design: Toy Example Input: Spreadsheet with 20000 rows and 50 columns. Also, order of rows matters. Task: Create 3 different reports on a new ...
-1
votes
1answer
48 views

How to execute a proper comparative performance testing?

There are two compatible versions of the same Product (e.g. database engine) that I want to compare to each other for the same input scenario (SQL query). The problems that I want to address at first ...
1
vote
1answer
283 views

How to update HTML/JS client from PHP server without refresh intervals?

I am building a simple client-side web page that can be updated from an admin page. I am using PHP for server-side manipulation of the client targeted page. The setup feels like an overkill to me: ...
3
votes
2answers
229 views

Architecture for real time updates from the data in file system

I am trying to revamp my legacy application to make it scalable and performant. Its current architecture is something like this Consider a short-lived script that gets invocated 500k+ times a day, ...
-1
votes
2answers
391 views

Will compiled python code be as fast as compiled C++ code?

I know that Python is an interpreted language and that c++ is a compiled one, or at least I like to think that I've understood some of their differences. Although C++ is apparently faster than ...
2
votes
2answers
221 views

Efficient uniqueness check on large dataset

I'm refactoring a health monitoring system which requires that certain attributes of an Entity have to be unique across the system. The attributes of an Entity are configurable by the end-user and the ...
0
votes
1answer
67 views

Booking problem

The initial task was to find very quickly, free time for resources, let say - hotel rooms, services availability. I came with following model: Let say we have 24h in 1 day, and 365(366) days in a ...
0
votes
4answers
440 views

Why don't we count CPU operations?

When evaluating code performance, CPU instructions is not the best metric, since the exact number of operations depends on the compiler, CPU model, architecture and so on. And we came up with a bunch ...
-3
votes
2answers
65 views

How specific is hardware optimization when building from source/how do I know?

How specific is hardware optimization when building from source and what should I look for in the documentation to decide if building for my hardware might be worth it? From threads like this one I ...
2
votes
1answer
209 views

How is a software able to read a network file faster than it appears to be possible?

Note this is a general, conceptual question about performance optimization. motivated by the following real-world case. I have a file on a Windows network drive that has a 100Mbps limt; it is a ...
2
votes
1answer
110 views

Is it a good software engineering practice to store libraries as attributes of objects?

Suppose I initialize a library, say, in python object - #filename: file_A import file_ class A(): def __init__(self): self.pd = file_.pd self.np = file_.np And suppose the ...
-3
votes
2answers
77 views

How to scale an application where every read results in a write?

So I am trying to design a simple URL shortener application where every time a URL is queried, it is going to update the number of times it has been queried. I'm thinking of using MongoDB and I am ...
5
votes
5answers
820 views

Performance: Is There a Reason to Use Processes over Threads?

This is a general question but I work in the .NET world so I'd like to know if there any specific quirks about the .NET Framework / Core platforms that I should be concerned about here. I think it's ...
1
vote
1answer
70 views

async notifications delivery

i have some back end service that is in charge of sending notifications to my end users via mapping between some identifier to their real web sockets. currently the service works in a sync way, ...
0
votes
2answers
624 views

How to speed up my software development workflow? I'm using Visual Studio 2019 to build, compile, run tests for dotnet, C#, Docker containers, etc

I am primarily working with C#, dotnet and Visual Studio 2019 with extensions like Resharper enabled. Visual Studio with Resharper is a memory hog. I currently have the following PC at home where I ...
1
vote
4answers
104 views

Performance issues in an pseudo microservice environment

I'm currently working on a project which is build as a microservice architecture. We have one "Gateway" which aggregates the data coming from the different microservices to return one aggregated ...
1
vote
1answer
116 views

Are universal apps any less efficient than platform-specific apps?

I have once seen a universal download for an app. It was said to work on Windows, MacOS, and Linux. If the exact same app is designed to work on three different without changing any code. For example, ...
2
votes
2answers
224 views

How to declare and share a lot of variables to provide best performance

My question is not about dilemma between clean code vs performance, but I want to understand exact issue with declaring variables and sharing them between functions. I read in many threads, that from ...
0
votes
1answer
94 views

Need to test for equality on vector clocks

I've heard about vector clocks and how to test if a message was sent before another message. E.g. Message A was sent before message B if every element of the vector of message A is smaller or equal ...
1
vote
3answers
280 views

Is `print statements` a defensive programming technique?

We had an exam and the question paper asked which of the following is not a defensive programming technique. I've answered it as print statement, that a print statement is not a defensive programming ...
0
votes
0answers
180 views

Implement multiple file upload with Dropzone.js , Lambda and S3

This is more a general question about this project I have on. We need to implement some UI for our costumers to upload multiple files (2000+) every month, so we can send them by email to another ...

1
2 3 4 5
16