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
0answers
42 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
102 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
65 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
132 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
114 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
44 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
645 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
123 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
111 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
301 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
194 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
267 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
291 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
130 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
638 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
78 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
50 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 ...
0
votes
2answers
80 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
68 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
171 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
232 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
218 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
66 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
438 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
62 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 ...
6
votes
4answers
655 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
69 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
513 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
102 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
114 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, ...
1
vote
2answers
219 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
67 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
279 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
155 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 ...
2
votes
1answer
126 views

Optimal design for improved performance of a simulation code

I'm writing a code for the Discrete Element Method where I have balls (spheres) and walls (planes) interacting with each other. Those simulations are run for billions of time steps, so performance ...
2
votes
1answer
48 views

Quantity allocation algorithm performance

I have a scenario for which I'll take an analogous example to help understand better. There are N buckets of known varying capacities. We have M balls that we need to put in these buckets to fill ...
0
votes
1answer
193 views

Why is this “more efficient” version of a Scala Collatz solution slower than tail recursion?

I implememted two versions of the collatz problem and felt an icy terror in the pit of my stomach as an optimized solution was slower than tail. The tail recursion is simple: // calculate the next ...
21
votes
10answers
8k views

What are the benefits of multi-file programming? [closed]

I have been told by another fellow C programmer to write large applications in several different .c and .h files, and then compile them together. They say it will run faster. Does a multifile ...
0
votes
3answers
154 views

What typical hardware improvements can be made to improve a Web app's performance?

We have a Single-Page (SPA) Ajax-based Java Spring/Hibernate app running in Tomcat 8.5. The app's performance is acceptable, but not lightning-fast. A typical Insert Record takes 3-4 sec., e.g. 05 ...
-2
votes
1answer
86 views

How to profile a program for performance without a profiler?

This is a general question but with a specific use case. There is only a single and completely unaffordable profiler for the Xamarin framework. So this makes me wonder if there are some programming ...

1
2 3 4 5
16