Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
-1 votes
2 answers
127 views

Should I store non-editable items lists in a database?

Relational database is mostly used for storing editable user data. But how about storing non-editable lists of information? Possible examples are: GUI-related: main menu items, selectbox options, ...
user avatar
-1 votes
2 answers
127 views

Performance hit after non-functional refactoring

I was asked to refactor some C++ code recently for the purposes of increasing unit testing coverage. The problem was that the code was tightly coupled on one compilation unit, so we had the equivalent ...
user avatar
33 votes
10 answers
9k views

Am I right that switching programming languages will have little impact on the scalability of a CRUD API?

An external consultant to our team advised us to rewrite our SAAS offering (essentially a CRUD API) in .NET because this is more "scalable" than using Node.JS (or Rails or Flask etc.). By ...
user avatar
  • 525
-1 votes
2 answers
84 views

Difficulty understanding how denormalization results in more storage necessary

I am having difficulty understanding how denormalization results in more storage necessary. For example, let's say that in a normalized relation, there's Table 1 and Table 2. In order to join Table 1 ...
user avatar
  • 153
0 votes
1 answer
254 views

Java: Is there a performance difference between variable assignment vs. inline usage?

Is there any performance detriment to assigning variables vs using them inline. I'm guessing this WOULD be worse if a method was returning primitive and I was 'boxing' it (e.g. method returning int, ...
user avatar
  • 287
2 votes
1 answer
367 views

Difference between `Class.X` and `Class.getX()`?

Might be a silly question or something I might have just messed up in my head but here we go... I saw a code example of someone using getPos() in their own class to retrieve the current position of an ...
user avatar
9 votes
5 answers
742 views

Today I wrote "tests" for the testing code. Was it the right thing? Is it a smell?

My application has big integration with the database. Classes that use the database are very crucial for the system, so I write small unit tests for classes that I call Repository. The reason behind ...
user avatar
  • 695
1 vote
1 answer
176 views

How to store a huge volume of time-series datapoints in an efficient way?

We have an application producing 5k-10k datapoints per second. Each datapoint has more than one metric, alongside its time of creation. We are looking for an efficient, scalable way to store this huge ...
user avatar
  • 127
1 vote
2 answers
92 views

Preventing parent component re-rendering of a big React component when you "Lift State Up"

I have a very big form - let's call it <MyForm> - consisting of the following: text fields and dropdowns custom selector made of selectable cards table input (for this example 50 rows with each ...
user avatar
  • 121
-3 votes
1 answer
44 views

Server performance and CMS scalability [closed]

I have been given the job of a colleague who has resigned and I don't know where to start. I hope you can give me some hints: It is about a CMS made from scratch (Javascript/jQuery/PHP/MySQL) which ...
user avatar
  • 97
0 votes
0 answers
55 views

Do datacenters have conditions that might throttle component clock speed (either intentionally or automatically)?

Here is the question. On a 2.2 GHz processor with 6 physical threads and 6 hyperthreads, I see performance on the order of 3-10s for a particular job involving OpenCV. I do not specify that the ...
user avatar
  • 109
0 votes
0 answers
78 views

Improving performance of 'Weighted/prioritized left shuffle algorithm'

I wrote a prioritized/weighted left shuffle algorithm (the code is copied from my open source C# project Fluent Random Picker). What does that mean? You've got some values and each of them has a ...
user avatar
  • 101
8 votes
4 answers
526 views

How to document alternative code I considered but didn't go with due to performance?

I write code in R, and often find myself attempting to optimize the code for better performance. In a given script that tackles a specific problem, I test different code alternatives and compare them ...
user avatar
  • 199
14 votes
3 answers
4k views

What are the complexities of a binary search?

I recently asked a question on CodeReview SE where using a binary search was recommended, and the author of the answer proved that it was faster than my implementation. During my research on the topic,...
user avatar
0 votes
1 answer
60 views

Right way to combine data between Mongo and DynamoDB

I am looking for a way of dealing with the following situation: 1- Have an items collection in MongoDB 2- Have a users collection in DynamoDB 3- Each document in the items collection has a "...
user avatar
  • 3
2 votes
1 answer
338 views

Multiple if condition optimization

Often I find conditional statements such as: if (life_max < max): if (expand): do life_max = max else: if (life_max > max) and not (expand): do life_max = max; Although readable, ...
user avatar
0 votes
0 answers
44 views

Why not using .hpp files containing forward declaration AND implementation over separating to .h and .cpp [duplicate]

I am not very experienced as a c++ programmer so I may not have understood all the subtlties of what i'm doing : yet, for a few months now, I always write my modules with .h files that are only #...
user avatar
  • 109
0 votes
1 answer
63 views

How should I model/design these aggregates?

I am new to DDD and I am trying model/design the aggregates of the following domain. The domain consists of several concepts: Assessment Models (AM) which contain Enabling Elements (EEs) and Focus ...
user avatar
  • 197
1 vote
1 answer
201 views

Advantages and disadvantages of including JS/CSS inside the HTML?

What are the advantages and disadvantages of including JS/CSS inside the HTML instead of separated files? Specifically concerned about performance issues, for example, if the CSS and JS are small and ...
user avatar
1 vote
2 answers
139 views

How to effectively handle a large API call

I have an API call that returns products to be displayed on a Point-of-Sale system. the current account I have has about 7000 products. Initially I made the API return all products at once, this works ...
user avatar
  • 21
-1 votes
2 answers
137 views

Using OOP objects mapping to DOM elements vs. querying the DOM repeatedly?

I'm trying to make better use of OOP, but I don't have good instincts for this yet and I sometimes worry I'm making things more complicated and/or less efficient. I'm wondering what is the best way to ...
user avatar
-3 votes
1 answer
74 views

Choosing between network optimisation and CPU usage in clientside web development [closed]

I'm working on a CSS library that includes hundreds of selectors and rules for quick templating instead of writing regular CSS. This is used as a replacement of attr() CSS function until it works for ...
user avatar
  • 147
1 vote
1 answer
95 views

Feature Store Design for input data like JSON, CSV and Excel

I need a design approach for a feature store which accepts input data in the forms of CSV, EXCEL, JSON etc. The backend stack we support is Java, Spring boot and oracle DB. Note : Each file ...
user avatar
2 votes
2 answers
126 views

Design a function that indicates significant deviations in response times

I'd need some feedback on how to approach the design of a function that highlights parts of a time series chart. The chart shows the response time of an application, in particular the 90th percentile, ...
user avatar
  • 337
1 vote
2 answers
125 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 ...
user avatar
0 votes
1 answer
120 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 ...
user avatar
  • 37
2 votes
2 answers
552 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 ...
user avatar
1 vote
1 answer
291 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(...
user avatar
-1 votes
1 answer
52 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 ...
user avatar
  • 467
3 votes
1 answer
542 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; ...
user avatar
  • 3,319
0 votes
0 answers
31 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 ...
user avatar
  • 9
1 vote
2 answers
313 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. ...
user avatar
  • 121
0 votes
1 answer
96 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 ...
user avatar
  • 324
1 vote
1 answer
65 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 ...
user avatar
  • 121
1 vote
3 answers
208 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. ...
user avatar
  • 146
6 votes
3 answers
288 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 ...
user avatar
  • 171
5 votes
4 answers
383 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)...
user avatar
  • 187
0 votes
0 answers
66 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 ...
user avatar
2 votes
2 answers
232 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 ...
user avatar
-2 votes
2 answers
122 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 ...
user avatar
-3 votes
2 answers
71 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 ...
user avatar
1 vote
1 answer
150 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 ...
user avatar
20 votes
6 answers
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 ...
user avatar
  • 335
-4 votes
1 answer
135 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 "...
user avatar
  • 95
1 vote
0 answers
47 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 ...
user avatar
  • 119
1 vote
4 answers
662 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 ...
user avatar
  • 129
-3 votes
2 answers
671 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 ...
user avatar
2 votes
2 answers
503 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 ...
user avatar
  • 129
0 votes
3 answers
549 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 ...
user avatar
  • 189
3 votes
2 answers
352 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 ...
user avatar

1
2 3 4 5
17