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

Automating performance tests for python code in a CI

My apologies in advance for a question that might seem trivial - I am a mostly solo dev in academic environment and a lot of industry best practices don't necessarily make it here. Several of my ...
0
votes
1answer
55 views

What approaches are there for handling elements in contiguous memory while being dependent on other user input

I am creating a vectorized reinforcement learning environment. It handles multiple instances of a board game in synchron. Up until now, the state of the environment was a specific representation of ...
1
vote
2answers
102 views

JS - two array filters vs. one forEach?

I've had a question for a while. I know that the Array prototype method filter is generally preferred over forEach, and I believe it is typically faster at the job as well. But what about if I have ...
0
votes
1answer
85 views

C++: Broadcast/observer pattern with polymorphic events

I'm currently trying to implement an event-system following a broadcast/observer scheme. I have events/notifications that contain information about what is happening: class Event { public: Event(...
-1
votes
1answer
49 views

How to objectively monitor REST APIs perofrmance based on the request/response size

We recently integrated a monitoring solution (Data Dog) for our REST-APIs based microservices. The monitoring solution gives us many useful metrics. For example, we can see the average response time ...
0
votes
0answers
28 views

What are the best choices to make for scaling a rule-based chat application?

I am trying to build a rule-based chat application that will integrate with Facebook Messenger. The application will ideally have a set of flows, like registration of a customer, subscribing to a ...
2
votes
1answer
125 views

In C++, If a member function can be made static with no change to functionality, are there any performance or memory benefits from doing so?

A very straightforward question. When I think about many of the member functions I create for my classes, many of them can be made static without affecting any functionality whatsoever. If I do so; ...
0
votes
0answers
27 views

A large number unused wakelocks and performance

There is an application that every day creates about 100-200 new wakelocks for android. each wakelock is used once and after using it is no longer needed, but remains in the system. Thus there are a ...
1
vote
2answers
129 views

Performance strategies for repeatedly iterating through large JSON files

I'm designing a project which will require iterating through a foreign language dictionary in JSON format. The idea is clicking on a word in a text will trigger a search on the JSON file for a match. ...
0
votes
0answers
47 views

The best approaches to implement query with pagination based on SQL DB (Oracle)

I have faced with the following situation: there is a grid with pagination and a filter criteria builder to filter grid data set in web UI, in backend there is a Java method, which analyze filter ...
0
votes
1answer
38 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 ...
1
vote
1answer
55 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
115 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
277 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
341 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
50 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
226 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
114 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
67 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
139 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
118 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
650 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
330 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
178 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
351 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
242 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 ...
4
votes
5answers
342 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
309 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
183 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 ...
3
votes
5answers
2k 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
113 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
53 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
37 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
65 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
122 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
99 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
114 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
52 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
603 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
236 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
905 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
230 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
453 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
67 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
210 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
78 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 ...

1
2 3 4 5
16