The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [performance]

For questions pertaining to the measurement or improvement of code and application efficiency.

0
votes
0answers
10 views

Large HTML5 Canvas taking 400-500ms per frame to render from p5.js. Is this a limitation of the library?

Let me start by saying that I am not sure if a solution even exists, but it would be great if I could find one. I am doing a school project to model the solar system. There was no specific ...
0
votes
0answers
6 views

How to speed up per column iteration

I would like to loop through a data.table and apply a function that requires info from another column in the data.table, sometimes even multiple... Let's take the mtcars as an example I have the ...
0
votes
1answer
14 views

Single activity multiple fragments / separate activities in a multi-step flow?

I've been developing Android for 3 years, and this is still a hard thing to decide when it comes to the similar scenario. Nowadays, I believe most of the applications has a multi-step screen / flow. ...
0
votes
0answers
12 views

Prevent Customer & Banner Ajax calls on Homepage

What is the purpose of these ajax calls and how to prevent these Ajax calls on magento 2 homepage, or atleast minimize their execution time because they are taking load time of around 3-4 secs on my ...
0
votes
1answer
48 views

Get every possible combination of numbers (fastest possible method)

I am trying to get every single combination of elements into an array. Now I can use the method below, and remove the duplicates, but this way is far to slow for my use. The code below would find ...
1
vote
1answer
33 views

Efficiently selecting from subsets of a list

Given a List of Vectors, how can I efficiently Select all of the greatest values of a property, among all members who share other values among different properties. For example, with the standard ...
1
vote
0answers
24 views

Many threads are waiting on condition and the load of server over 100

Too many threads on WAITING state in Tomcat. 50% threads is WAITING ON CONDITION Tomcat 7. Cpu core 16. Cpu us82%. Memory is enough ,16g free space. There is only 1 fullgc in half a hour. Linux sys ...
0
votes
0answers
11 views

How to speed up the expansion of very large polynomials in sympy?

I am working with very large polynomials in sympy and I need to have them in expanded form to find certain terms and coefficients. However, the expansion of these polynomials takes a long time. Is ...
0
votes
2answers
37 views

Does the distance between read and write locations have an effect on cache performance?

I have a buffer of size n that is full, and a successor buffer of size n that is empty. I want to insert a value within the first buffer at position i, but I would need to move a range of memory ...
0
votes
2answers
36 views

Avoid applying a function to an index column

I need to filter out data that exceeds a certain length but the column that contains the data is an indexed column. If I apply a function to the column I lose the benefit of the index. I cannot ...
0
votes
0answers
24 views

Set timeOut for session/transaction to DefaultMessageListenerContainer

I want to receive chunk of messages from Queue within some timeLimit(Ex : 300 millisec after receiving the 1st message) using DefaultMessageListenerConatiner Of Spring (By overriding ...
0
votes
0answers
23 views

Impact of RAM size on mongodb performance [on hold]

I'm trying to test the impact of the size of RAM on the performance of mongodb. So far I can't find such impact and trying to figure out if the methodology I use is correct and if not, what to change. ...
0
votes
1answer
45 views

Correct way to check performance of piece of code in C#

Just assume I have two pieces of code and I want to check CPU usage and Memory of these codes and compare together, is this a good way to check performance: public class CodeChecker: IDisposable { ...
0
votes
0answers
12 views

Do getResourceAsStream and FileInputStream have the same performance?

I have to implement some performance tests on an application. This application can load files from both classpath (using getResourceAsStream) and file system (using a FileInputStream). I was ...
0
votes
0answers
8 views

How to create a code on Jupyter notebook to test the internet speed

I would like to know if there is the possibility to create a code on jupyter notebook to test the internet speed. The output could be the Download and the Upload rate.
0
votes
3answers
77 views

Java large for performance

I have to find the thousandth number (excluding numbers 3, 4, 7) but it's taking a long time, about 9 seconds to find out how to improve performance. import java.sql.Date; import java.text....
0
votes
0answers
28 views

oracle sql tuning: IO requst or IO bytes ,which should I prefer?

I am tuning sql now. Oracle 12.1 BLock size :16K DB_FILE_MULTIBLOCK_READ_COUNT: 64 SYSSTATS_MAIN CPUSPEEDNW 2698.14241486068 SYSSTATS_MAIN IOSEEKTIM 10 SYSSTATS_MAIN IOTFRSPEED 4096 ...
0
votes
2answers
33 views

Why is converting date format slower with buffers than with String operations?

Consider this code: //Buffers and views function convertDateTimeToFormat(date, format) { var buf = new ArrayBuffer(14); var result = new Uint8Array(buf); var positions ...
21
votes
3answers
2k views

Performance gap between vector<bool> and array

I was trying to solve a coding problem in C++ which counts the number of prime numbers less than a non-negative number n. So I first came up with some code: int countPrimes(int n) { vector<...
0
votes
0answers
12 views

Register and Unregister step count sensor in foreground service

I have a service which is foreground service, I want to it's unregisterListener() at sleepTime and registerListener at weakUpTime. So I use Handler post delay but some time it is not work because ...
4
votes
2answers
48 views

Maria DB INDEX selection - Why maria is choosing a suboptimal index?

I have a quite big table (millions of rows), running on MariaDB (InnoDB, 5.5.48-MariaDB-1~precise-wsrep), let's say my table structure is the following [ ID, Field A, Field B, Field C, Field D ] I ...
0
votes
0answers
18 views

Flatlist performance issues, What am i doing wrong?

We have implemented flatlist in our app, Flatlist has a header(i.e one more flatlist). The items which will be selected from flatlist should be seen in the header with 4 custom picker(created using ...
-1
votes
0answers
12 views

Performance R6 creating multiple objects

The performance of creating multiple R6 classes results in a lot of overhead (which seems to me as a memory allocation problem). Compared to the rep of the same object the factor between the ...
0
votes
0answers
24 views

Insert into a table with primary key is very slow in Mssql

I am trying to create a datamart with 80 columns and 30000 rows. I created a table in Mssql with primary key and try to insert but it takes 20 minutes then I stopped the query. When I drop the Primary ...
1
vote
0answers
24 views

kafka broker server uneven CPU utilization

We have 3 node of kafka cluster with around 32 topic and 400+ partition spread across these servers. We have the load evenly distributed amongst this partition however we are observing that 2 broker ...
-6
votes
0answers
40 views

SQL: Which one is faster? using JOIN or WHERE [on hold]

From the two SQL queries below, which one will have a faster execution time? select * from A, B where A.id = B.id; select * from A JOIN B on A.id = B.id;
2
votes
0answers
38 views

Why java Graphics drawImage first time is slow

I want to mix some images in java.awt.Graphics, so I write utils to do that. I find it is so slow to call the graphics.drawImage(); the first time, it takes 2 seconds. I think there is something that ...
0
votes
1answer
40 views

How to improve efficiency of my find target function

I need to improve the efficiency of my program and, using the profiler, have narrowed the problem down to 2 key areas, but I am having trouble coming up with ways to make the program run better. ...
1
vote
1answer
36 views

R Fastest way to write for loop using vectorization

Say I have a simple for loop which adds a random value to a data frame. person <- c("Clark Kent", "Bruce Wayne", "Tony Stark", "Carol Danvers") sleep_time <- c(8, 1, 3, 6) data <- data.frame(...
-1
votes
0answers
41 views

Qt app vs native java app on Android, which one achieves better UI performance?

I know that a Qt app which is written in C++ has better performance in terms of code optimization and runtime. But I heard that, on Android, its UI performance is not good, due to the fact that the ...
0
votes
3answers
53 views

What is the best/most efficient way to measure time when running a program in C?

How can i record the running time of my program every time I insert an input?I tried this particular method: clock_t tStart = clock(),tEnd; And after printing the ouput: tEnd = clock(); printf("...
1
vote
1answer
59 views

java BigInteger conversion algorithm

BigInteger from Java stores number as array of "unsigned integers" (it is array of integers, but they store information in 32-bit system and later cast it to long and make operation). How do they ...
0
votes
1answer
27 views

How do I optimise a filter loop for Cortex-M3?

I just need to alter the code so that it does the same basic function but more optimised, basically I think the filter loop is the main piece of code that can be changed as I feel there are too many ...
0
votes
0answers
14 views

How to have multiple, concurrent SqsMessageDrivenChannelAdapter polling queue?

I'm experiencing some really bad throughput issues with spring-integration-aws's SqsMessageDrivenChannelAdapter, which is Spring Integration abstraction around spring-cloud-aws's ...
0
votes
0answers
20 views

How to use temporary variables in detail bands?

I am trying to print two datasets in a detail band. In my first case I try to generate a page with two datasets with additionally printing the different pagenumber, this works. Now I want to generate ...
-1
votes
1answer
31 views

Why does Cloud Functions perform so low yet so expensive?

I just register a Google Cloud free tier lately & took interested in Cloud Functions which can make me develope & run code without install OS system or Software Development Tools. So i want to ...
1
vote
2answers
17 views

Combine 2 update querys in a single query - performance

Im programming a favourite function. For example we have multiple adresses and can choose one as favourite. At the moment i got 2 querys to do this job: UPDATE userdata SET maindata = 0 WHERE cid =...
0
votes
1answer
25 views

Performace read from file fgetc vs fread entire string

I try check what is faster: Calculate size of file, read entire content to string (char*), operations on string VS. Read char by char using fgetc and making operations on single char. My results ...
-1
votes
0answers
10 views

Performance monitoring tool for an C++ application

I need to design a tool that can monitor my C++ application performance.The idea is that randomly I can pick already processed jobs log , parse the log file through the tool and get the performance(...
0
votes
0answers
14 views

How to tune below query

I am trying to tune the below piece of code but not able to get positive results. I have tried some indexes and hints . Below is the query which is taking lot of time . I need to tune this query. I ...
1
vote
0answers
29 views

Slow Performance on Ionic4/ Angular7 (Modal, ion-button)

I am using Ionic 4/ Angular7 with angular/material to build my app. However I am facing a slow performance issue on my real device (Samgsung C5). My Page setting is a Home.page contain a ...
-2
votes
0answers
21 views

Open JDK 1.8 and JDK 1.6 different in performance [duplicate]

I have spring batch job which run in java 1.6 without causing the cpu percentage to increase to more than 100% However when i upgrade the jdk 1.6 to open jdk 1.8 , the same spring batch job run ...
0
votes
0answers
24 views

Aggregation of values to compute quantiles

I'm generating data in batches, that is stored in a MongoDB. Each document has a numerical value > 0, let's call it x and various other fields. I need to calculate all quantiles/percentiles from 0 to ...
0
votes
4answers
54 views

Select distinct fields of an ArrayList of Class X

I have an ArrayList of Class X. ArrayList<X> items = new ArrayList(); Class X contains multiple fields, all of the type string. (id, description, brand, ...) So what do i do if i wanna get ...
0
votes
0answers
13 views

Prefetch Url is getting called multiple times when using typeahead js to a dynamically generated element

I have created a jquery plugin to call typeahead js to a dynamically generated element. $(function () { $('.input').generateAutocomplete({ 'jsonUrl': '[the json return URL]', '...
0
votes
1answer
21 views

JQuery Multiple .load() Functions Loading One at a Time vs. Asynchronously

I am trying to use the jQuery .load() to load 4 files onto a single page. The problem is, they don't load asynchronously. Instead, each file loads in one at a time, causing my page to load much slower....
-1
votes
0answers
16 views

Looking for javascript plugin that can handle a folder structure with check boxes and huge number of children inside each folder [on hold]

We have an application similar to dropbox, where in huge number of files are stored in multiple folders. I would like to show them with check boxes and of course, with navigation (next & previous ...
0
votes
1answer
22 views

How can I enforce Oracle to use index and then union instead of full table scan when HQL query is using “OR” condition?

Guys: I have a query written in HQL, which uses 2 OR condition to merge result in the "where" clause part. Hibernate framework gets result very slow because it did a full table scan on table DboX ...
0
votes
0answers
33 views

How to improve performance of an OpenCV algorithm written in C++

I am executing a computer vision program written in C++ and OpenCV on Raspberry Pi 3B and my camera module is picamera. Roughly I am calculating the deviation amount from the road and sending it to ...
2
votes
2answers
31 views

Best way to lookup and return data for conditions based on 2 columns and 1 row

I have 2 sheets in Google Sheets. One sheet being an individual roster for an employee and another sheet containing all the errors all 99 employees have made for each individual stores. Every day we ...