Questions tagged [performance]

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

1
vote
0answers
7 views

mpirun performance analysis

I'm running mpirun (OpenMPI) with 86 processes on 12 CPUs and 2 GPUs on Ubuntu 18.04. The application that is being run is training neural networks. After a day or so of training the iterations slow ...
2
votes
1answer
28 views

Counting number of partial overlaps for date range intervals

I need to run a loop over a dataframe with ~150K rows. However, the loop needs to check each row and check a condition that checks every other row in the data set. My code works fine for a toy dataset ...
-1
votes
0answers
15 views

Are static Broadcast Receivers inefficient?

Unlike dynamically registered Broadcast Receivers, the ones registered in the manifest are able to respond to events even after the activity or even the app that created it has been closed. So, my ...
0
votes
0answers
10 views

How to fetch entities multiple levels deep with Hibernate

I'm trying to optimize my code by reducing queries by fetching deep associations in a single query. I looked everywhere and found this guide https://vladmihalcea.com/hibernate-facts-multi-level-...
2
votes
2answers
34 views

Create a List compose by matching fields between a List of Maps and an List of Objects using Lambda Functions?

I'm new to Java lambda expressions and have been struggling with the following problem: I have a List of label objects, whose fieldsid are the only keys I wanna extract from the other List of Maps. [...
1
vote
1answer
15 views

Loading large images

Nowadays, images which are captured by phones camera are too large. I was asking how to load images that its size is too large ( > 5 MB ) into ImageView after a long search I found libs like Picasso ...
0
votes
0answers
26 views

How Date type of index is affect on the performance [on hold]

I want to make a composite index with int, nchar and date types. How the date fields affects on the queries performance? Is it a good solution to make this?
2
votes
1answer
76 views

C++ Merge sort slower with threads

I've implemented a merge sort algorithm in C++. Inside the algorithms it checks if the size of the array is larger than min_size_to_thread and if it is: calls the function recursively with threads ...
0
votes
0answers
29 views

Django - Too slow database record read

I have a database with about 1500 records about one class. I'm also using jQuery Datatables to list the records. views.py: records = Animal.objects.all() template: {% for record in records%} <...
0
votes
0answers
32 views

Java - Handling a POJO via interfaces or by the POJO class itself? Efficiency?

I've been looking through some projects of games similar to the one I am developing and I've seen two ways of handling methods to mutate the Player. Notes: a car, house, and job are the only three ...
0
votes
0answers
6 views

Reading ROC plot vs accuracy ,specificity and sensitivity

I have a binary classification problem, and I extracted 3 types of features Discrete wavelet transform (DWT), Gray level co-occurrence matrix (GLCM), and Local Binary Patterns (LBP) when I performed ...
0
votes
1answer
25 views

How to reshape a 183,223,040x4 matrix into 140 matrices of dimensions 1145x1145 in a reasonable time?

I have a matrix of dimensions 183,223,040x4 with the variables showed below. There are 140 different values in 'REG', and 1145 different values of both 'SAMAC' and 'SAMAC.1' I want to iterate over ...
0
votes
0answers
23 views

Eigen: Optimizing Out of Bounds Matrix Blocks/ Slices Around Entry

As part of a personal project, I would like to optimize the following function so it runs as quickly as possible. Any performance gain matters since the performance of the rest of the program depends ...
1
vote
0answers
22 views

Tensorflow operations are unsusably slow

I'm trying to get started with tensorflow using the python interface. My problem is that executing even the most basic operations, they take a long time (> 5 minutes) This problem occurs when using ...
0
votes
3answers
25 views

Reading a large text file using BufferedReader, how badly does printing each line slow down the process?

I created a program to read a very large text file (2.5 GB), and re-write each line to a new text file formatted how I would like it to be. All is going well, but when I wrote it, I put a little '...
0
votes
0answers
16 views

Angular 7 all request to server several second as pending before reaching the server

I built and finished a full angular 7 app with MySQL and PHP as database and back end language respectively. Each sent request, even with small size response, like 100 byte, will take extra few ...
1
vote
1answer
75 views

Cursor in SQL Server taking too much time for 35 million records

I have created a cursor in a stored procedure, my select statement result has around 35 million records. I am fetching each value of cursor and executing the stored procedure, in turn the next stored ...
1
vote
0answers
46 views

How to sort a linked list using an efficient algorithm, with only the list sent as parameters? [duplicate]

I want to implement a function that uses an efficient sorting algorithm (mergesort, quicksort), to sort a linked list, with the list being the only parameter. It needs to be consistent with the ...
0
votes
2answers
57 views

Trying to improve WPF application startup performance

Update I have updated with the code sample running with at application startup, and uploaded a new image of performance profile results. I do not understand the reason that there is no ...
0
votes
0answers
15 views

Scale multiple containers of a service in a single host

I am scaling multiple containers of a service on a single linux host by command "docker-compose up --scale". However, each container can use all the resources (CPU and RAM) of the host. It seems to be ...
0
votes
3answers
34 views

Very Slow result when use WHERE and ORDER BY condition in MYSQL Query

I am facing issue of very slow result. I am sharing table structure as and results also. if you have any suggestion please update soon if possible for you. ==========================================...
1
vote
1answer
20 views

Tridiagonal Matrix Algorithm with Numba nopython mode

I am trying to write a TDMA algorithm with numba in nopython mode. Here is my code: @jit(nopython=True) def TDMA(a,b,c,d): n = len(d) x = np.zeros(n) w = np.zeros(n) # ac, bc, cc, dc = map(...
0
votes
0answers
26 views

How to diagnose performance issues with an encrypted procedure without execute and alter permissions?

That's the question I got in the interview. And I couldn't say anything more than parameter sniffing. But this is not a method of finding a solution, but one of the possible problems. And I wonder how ...
-1
votes
0answers
26 views

ARMv7 NEON performance

I have the same problem as in ARM Assembler NEON - Increasing performance, but I have not found answer in that topic. I have converted part of an algorithm from C to ARM Assembler (using NEON ...
-7
votes
0answers
63 views

How to make my web scraping code faster ? (C#) [on hold]

Problem I need to crawl one website. The task is to collect all words that starts with letter 'a' and put them in database (MSSQL). There are 53 pages with about 10350 words that starts with the ...
0
votes
0answers
5 views

What is the quickest way to interpolate an N-D variable on a non-uniform lat-lon grid onto a circle of points defined by lat-lon?

I'm attempting to interpolate an N-dimensional variable (could be 4, 5, 6, etc. dimensions) from a non-uniform lat-lon grid to a circle of points in lat-lon space. Right now I'm looping through each ...
0
votes
2answers
36 views

Optimize Django Rest ORM queries

I a react front-end, django backend (used as REST back). I've inherited the app, and it loads all the user data using many Models and Serializes. It loads very slow. It uses a filter to query for a ...
-3
votes
0answers
71 views

Improve structure of search algorithm in C++ [on hold]

I often encountered this type of problems where several loops are needed to search and filter data. So far,I used is a 'break down' code structure that is repetitive and inefficient. Here is a ...
0
votes
1answer
45 views

Improving performance of complex logical conditions on numpy arrays

I need to evaluate many logical conditions on a large 2D "NUMPY" array, and collect the overall result in a boolean "RESULT" numpy array. A simple example where all conditions are linked with an AND ...
-1
votes
0answers
22 views

Avoid landing page redirects how to fix

Avoid landing page redirects for the following chain of redirected URLs. http://industriesfinest.com/ http://www.industriesfinest.com/ https://www.industriesfinest.com/ https://industriesfinest.com/ ...
0
votes
0answers
13 views

How to highlight search in DataGrid faster in wpf?

I am searching in a datagrid through a textbox and my code highlights the searched text in datagrid cells and filter the rows according to the search.This works fine for small number of rows but as ...
2
votes
1answer
59 views

Which is more efficient as the default argument: None or lambda x: x

Out of curiousity, what's more efficient when calling the following function without the second argument? Using an if statement: def f(elements, l=None): for el in elements: ... ...
-1
votes
0answers
22 views

Is there a way for Javascript developers to predict and utillize Javascript-compiler optimizations?

Coming from different languages background, I know that compilers tend to re-interpret source code differently from how it was written to generate better byte-code, omitting unreachable code sections, ...
0
votes
0answers
15 views

Enumerate loop slow and exceeding generator capacity python3

I am trying to work with igraph with python trying to add a node to a network. My loop iterates over the vertex list. My problem is my code runs slow and cannot terminate. It ends with StopIteration ...
1
vote
0answers
15 views

Why is my gatsby website's main thread so slow?

My main-thread is 6.1sec long based on light house. My website is https://ali126191.github.io/charity-project-starter/ Light house main thead results: Category Time Spent Script Evaluation 2,267 ...
0
votes
2answers
42 views

How to improve Get method performace which reads data from hazelcast?

I have following controller: @GetMapping("/v1/quotes") public List<MyQuote> getQuotes() { return hazelcastMap.values().stream() .map(r -> new Quote(r)) .collect(...
0
votes
1answer
27 views

How to write an optimized DAX Measure to aggregate a value by two group by attributes

What if we need to aggregate (Sum) of a value group by two attributes in DAX. I wrote the following measure with Summarize function but it is very slow. Reorder := SUMX ( SUMMARIZE ( ...
0
votes
0answers
51 views

Adding an Index to my table doesn't seem to be improving search performance - why is this?

I have the following on my Property class: [Index] public Status PropertyStatus { get; set; } Where Status is an enum containing one of five integer values, ranging from 0-4 inclusive. When ...
0
votes
0answers
12 views

Running JvisualVm in Eclipse for Rest Application through postman

I am working on a Maven Rest application. In order to run locally i user cargo maven plugin to deploy my application jar into container. I want to use jvisualvm to test the application performance. ...
0
votes
0answers
13 views

Can I vectorize the interpolation of a non-uniformly spaced multi-dimensional array?

I currently have a routine that takes a 5D matrix (x,y,z,t,p) and interpolates the data onto a series of circles in x-y space of different radii. For each p--p represents model solution--the full ...
2
votes
0answers
47 views

Increasing the speed of logical iterations Python

I am building a ranking algorithm in Python to rank college basketball teams. The algorithm works as follows: I have a data frame (5464 rows) with every college basketball game (we will call this ...
0
votes
0answers
18 views

Transitioning between 3 background colours

Currently, I'm using a the following to transfer between 2 background colours: background_Transition.xml <?xml version="1.0" encoding="UTF-8"?> <transition xmlns:android="http://schemas....
0
votes
1answer
26 views

Doctrine big query performances

Hello Stackoverflow :) I'm struggling a lot with a big doctrine query, there is 17000 contacts in the database and near 1 millions rows for statistics and orders. As you can see there is a lot of ...
-1
votes
0answers
33 views

Why does acquiring a JDBC connection on localhost take so long? [on hold]

It takes about a 500 milliseconds. I would think that on localhost this should only take like 10ms, not 500. I was trying to debug using JVisualVM to try to figure out what was taking so long, but ...
1
vote
1answer
57 views

Is there or will there be a Scala collection extending Seq with faster iteration than Array?

From what I tested and read, Array is the fastest collection when it comes to do random access or iteration through foreach, while, and tailrec, but they are mutable, unlike Vector, which is ...
0
votes
0answers
26 views

Android - Are these values normal for an app?

I need to say i'm very new to android. Lately in my recycler view when i load over 100 items (mostly pictures) my app first lags then closes itself without error message. These are profiler values. ...
0
votes
0answers
12 views

How reusing connections results in efficient networking on android?

I was going through the android docs for Efficient Network Access. I got the data prefetching part as well as the batch transfer approach, basic crux behind both of them being Don't keep the network ...
0
votes
0answers
25 views

How to determine root cause of sluggish Nashorn performance or bottleneck with pre-compiled scripts

I'm having some sluggish performance in Nashorn that I can't really explain the cause of. I'll detail what my setup is and how I've tried to debug it. Hardware: Fairly decent server hardware ('13 era ...
-1
votes
1answer
20 views

what is the best platform to retrieve the cpu performance in the form of percentage for gcp vm instances

We are working on gcp. we created some vm instances. now we want to retrieve the cpu usage in the form percentage and we want to store it in the data base in the form of table. we are working on a ...
0
votes
1answer
26 views

Wordpress page is idle for 25+ seconds and script only take 1 sec to load how to find the delay in oage load

I have site on aws windows server and running a wordpress site with the help of xampp, all pages are loading fine but there is one page ("http://13.58.255.34/candidates-list-with-filterable/") this is ...

http://mssss.yulina-kosm.ru