Questions tagged [performance]

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

-1
votes
0answers
32 views

performance - How can I efficiently use Java 8 to improve performance?

How can I efficiently write following method in Java 8? I am new to Streams API and want to use it if it really gives some performance advantage. private String getValue(int bitNo, int subFieldNo) { ...
0
votes
0answers
20 views

Why does the same call to Stanford CoreNLP server sometimes is >50x slower than the previous same calls?

Why does the same call to Stanford CoreNLP server sometimes is >30x slower than the previous same calls? Demo (in this case every ~12 API call is ~30x slower, even though the parsed text is the same):...
0
votes
1answer
41 views

Why choosing `unwrap_or_else` over `unwrap_or`? [duplicate]

fn main() { let _one = None.unwrap_or("one".to_string()); let _two = None.unwrap_or_else(|| "two".to_string()); } Any particular reason why people should prefer unwrap_or_else over unwrap_or? ...
1
vote
0answers
22 views

How to speed up conversion array of shorts to bitmap in Kotlin

I receive data from depth sensor using Vendor API. This API provides images in form of array of shorts, but original data from sensor is array of uint8, which is causing corruption of image and I need ...
-1
votes
0answers
40 views

Why is docker so much slower than running on host for multiple languages?

Since I started doing any backend development work, I have always used docker, and I guess always assumed its performance was pretty much on the same level as running it on host. I have mostly used ...
0
votes
2answers
45 views

How to increase the performance in reactive programming with single core cpu

I have an application which connects to third party service and gets the result back to client. Inside , app make an GET request to third party service and gets the result. I have used Reactor and ...
1
vote
1answer
30 views

Sqlite- Show results in desired order

I have created a sqlite table with two columns -Code and Name and stored data in it. User is provided a searchview to enter code or name and the app show results accordingly. I am using below query ...
0
votes
1answer
32 views

How to vectorize python for loop that modifies each element of a dataframe?

I have a Python script, using pandas dataframes, that fills a dataframe by converting the elements of another dataframe. I could do it with a simple for loop or itertuples, but I wanted to see if it ...
4
votes
3answers
116 views

Optimizing suggestions for a piece of Julia and Python code

I have a program for a simulation and inside the program I have a function. I have realized that the function consumes most time of simulation. So, I am trying to optimize the funcion first. The ...
0
votes
0answers
14 views

Cache in clustered environment - Read Cache every microsecond and update it every 50 minutes

I have an engine that processes millions of requests so we are thinking on Saving the authtoken (OAuth2.0) in cache, the authtoken has a lifetime of 50 minutes so it needs to be updated, what is the ...
0
votes
1answer
31 views

Using numpy functions which numba doesn't support

I am currently using a function to create histograms using numpy.histogram() and numpy.histogram2d(). To speed up the process using numba, I tried to use @jit decorator to interpret in nonpython mode, ...
0
votes
0answers
19 views

Performance dropped after updating to android 9

I noticed that performance dropped on Samsung a8+ after updating to android 9. I found that if you turn off the Navigation Bar and enable Full screen gestures, then everything works well. I ...
0
votes
1answer
47 views

Xamarin.Forms Infinite Scrolling Image Background Effect

I'm trying to make what I think will be a nice effect for an app - a series of images (think wallpaper) will be constantly scrolling in the background during a view. I started prototyping this in ...
0
votes
0answers
40 views

How do I speed up this loop in python?

I have this code that consists of five nested loops with each one with 100 iterations and it still hasn't finished after 5 hours. I am a noob to python, so I just wrote the simplest code. Can anyone ...
1
vote
1answer
24 views

Is a lot of mongodb dynamic collections a bad thing for a project and have an effect on performance

I am looking to start using MongoDB for a new project. I am running into the issue of planning where I believe I will have collections that go over the limit if stored together. After doing some ...
0
votes
0answers
31 views

android:performace issue of animation for each recyclerview item

Our UI designer has come to this idea: he wants to add animations, such as swing or two views switching repeatedly, to each recyclerview item. From my point of view, the requirement is ok, but I ...
0
votes
0answers
51 views

Is there a way to define operator overloads for cython structs?

I need to create a vector representation in cython and want it to have the best performance as possible which led me to use cython structs instead of cdef classes as I dont want any python overhead. ...
0
votes
0answers
15 views

need to fail maven build if file size is more

i want maven build should fail for react/node/webpack based build generates file size more. i am using webpack 4 and adding performance to check file size. if file size more, npm build should show ...
0
votes
1answer
27 views

Join all columns from multiple pandas dataframes into one dataframe with data and column names

I have N Dataframes with different number of columns, I want to get one dataframe with 2 columns x and Y where x is the data from the columns of the input dataframe and Y is the column name itself. I ...
0
votes
0answers
52 views

CUDA AtomicAdd faster than unsafe access

I am doing my first steps with CUDA and try to implement a simple histogram calculation. I just split the array accross multiple blocks and threads and optionally let a thread calculate two iterations ...
3
votes
3answers
119 views

Python decompression relative performance?

TLDR; Of the various compression algorithms available in python gzip, bz2, lzma, etc, which has the best decompression performance? Full discussion: Python 3 has various modules for compressing/...
2
votes
1answer
37 views

HttpsServer causes 100% CPU load with curl

I've created a minimal application around Java's HttpsServer. I've installed an HttpHandler that replies to a request with a short text message: return exchange -> { try { ...
0
votes
1answer
21 views

Fastest way to convert a set of 3D points into image of heights in python

I am trying to convert a set of 3D points into a heightmap (a 2d image that shows the largest displacements of the points from the floor) The only way I can come up with is writing a for look that ...
1
vote
3answers
91 views

What is the best way to optimize a nested where clause that has multiple conditions?

I'm trying to find a list of ReturnItems where the quantity of a single item being returned is more than the original ordered quantity for that item. So there are 2 different lists of objects in play ...
1
vote
1answer
103 views

Performance issue of std::move for different length of std::string

I recently noticed that std::move for std::string in my program is somehow slower than direct copy assignment. For example, #include <string> #include <vector> ...
1
vote
1answer
44 views

How to Increase SQL Query Performance on where clauses searching concatenated values

I have a query that runs extremely well (fast) when run, but as soon as I try to search by a concatenated value, the performance dives. What are my options for keeping the performance high? I'm aware ...
0
votes
1answer
23 views

The most suitable way to store encrypted data in Postgres

I've got a byte array (about 100 bytes maximum) of data encrypted with AES/GCM. I wonder if you could help me choose the best data type for it. On my past project we were just using varchar2 in Oracle ...
0
votes
0answers
18 views

Why does older Android device outperform newer device on RenderScript application?

I'm testing image processing app on several devices. The app has two versions: strictly sequential one, and RenderScript optimized one. Older device performs worse on sequential, but better on ...
-3
votes
0answers
32 views

Oracle SQL Slow [on hold]

Quick question on Optimization. Does anyone have any idea why this query would be taking 35 minutes to run? SELECT zc7.name as MCA, zc11.name AS Facility, pat.pat_mrn_id AS MRN, pat.pat_name ...
2
votes
2answers
28 views

Nested For Loops With Calculations Vs. Linear Process

I'm iterating over M dataframes, each containing a column with N URLs. For each URL, I extract paragraph text, then conduct standard cleaning for textual analysis before calculating "sentiment" scores....
0
votes
1answer
21 views

A fast solution to obtain the best ARIMA model in R (function `auto.arima`)

I have a data series composed by 2775 elements: mean(series) [1] 21.24862 length(series) [1] 2775 max(series) [1] 81.22 min(series) [1] 9.192 I would like to obtain the best ARIMA model by using ...
0
votes
0answers
22 views

Index bloat on GIN index for INSERT only table

I have a table with a column that is an array hstore. In JSON notation, the data for this field looks like: [ { type: "Pickup", id: "49593034" }, { type: "User", id: "5903" }, ... ] The number ...
1
vote
1answer
29 views

Why is headless NetLogo simulation running slower on a high end computer cluster than on my desktop?

On my university’s high end computing cluster, I use the following script to run a Java program (repls.class): #$ -S /bin/bash #$ -q serial #$ -l h_vmem=10G source /etc/profile module add java export ...
1
vote
0answers
24 views

Xcode Energy impact very high - Display on iPhone X

I have noticed that for an iPhone X, the Energy impact has another item, Display, and an iPhone 6 plus doesn’t have this. The problem is the fact that the energy impact tends to decrease on the iPhone ...
0
votes
1answer
29 views

JavaScript execution and Network bandwidth

Need help in understanding if JavaScript performance might be impacted by slow network connection. I have gone through the JavaScript execution speed thread. All though the code runs on a decent ...
2
votes
2answers
44 views

Float16 is much slower than Float32 and Float64 in numpy [duplicate]

I was trying to run a code snippet which looks like, import numpy as np import time def estimate_mutual_info(X, neurons, bins = 5): xy = np.histogram2d(X, neurons, bins)[0] x = np.histogram(...
-1
votes
0answers
10 views

Animating an SVG for pagespeed

I have a floor plan that needs to be interactive. Basically it shows 4 different floors that the user can click. As of now I have integrated 4 svgs that I've compressed and added classes to the ...
-1
votes
0answers
6 views

Best way to integrate photo animation

I have an image that needs to be animated. It's basically a long image that needs to go from top to bottom once the page is loaded. Out of curiosity I wanted to know the best way to implement this in ...
0
votes
0answers
28 views

Matrices vs regular methods to convert data from cartesian to screen coordinates

I'm trying to test matrices as opposed to using regular methods on point data to see which is faster. I generate point data and try to covert/map it from Cartesian to Screen coordinates, then do 2 ...
1
vote
2answers
28 views

What is the correct way of using the map while getting the last update record from the list of object

What is the difference between the below two approach of getting the last updated record from the list and which one is better and why? Example - Assume List of Message contains the record in ...
3
votes
1answer
94 views

Perl Regex Unexpected Performance Hit

Perl v5.28.1 The benchmark : use common::sense; use Benchmark qw(:all); my $UPPER = 10_000_000; my $str = 'foo bar baz'; cmpthese(10, { 'empty for-loop' => sub { ...
-3
votes
0answers
19 views

Please, help solution “missing semicolon” [on hold]

I find the following error examining a page with Google developer tools. It is repeated 8 times on the same page :( Your help is very grateful. Thanks!! ))));for(a=0;a<s;a++)i=t[a],i.style&&...
0
votes
0answers
10 views

Can Citrix affect UI rendering while running Internet Explorer in IE8 compatible mode?

I am seeing some UI performance issue in our application which uses jquery.layout 1.3.0 - Release Candidate 30.7. Our UI basically consists of multiple rows and when you click on a row a slideout ...
0
votes
1answer
29 views

How to get a google recaptcha V3 response

I am using Google reCaptcha v3. i am trying to implement it onto my aspx page.When i first load my page i can get a token back. However when i click on a button to process my page it comes back with a ...
0
votes
0answers
30 views

with no errors reported on console, how to determine what part of my JS slows down site over time

To clarify, is there a plugin or extension for web browsers that will tell me more about what areas of code causing things like errant event loops (unintended recursion), or events firing more quickly ...
0
votes
0answers
18 views

Optimizing a symmetric test

I have n items. For each pair, I have to run a test (True/False). The test is symmetric: test(a,b)=test(b,a). I'm looking the fastest solution to run these tests. Each item has an id and a property. ...
0
votes
0answers
40 views

Want to Convert COBOL based files in any good performance programming language [on hold]

I am trying convert my 1000+ COBOL language programs in to any new/good performance programming language, our team choice is SCALA Could any one please suggest any robust/high performance language ? ...
0
votes
0answers
8 views

How to read redis-cli --latency-dist graphic

I have an application that is using Redis for caching and after a while, the application slows down until I flush the Redis cache. So I now try to investigate what's wrong and used stat, monitor and ...
0
votes
0answers
13 views

What is the most SEO and Performance Friendly way to add a second language to an existing static website? [on hold]

I have a static website in English. I would like to add a second language while keeping the site SEO and Performance friendly.
1
vote
2answers
31 views

Get “rank” of badge on SO for my user - query is slow - speedup possible?

I was curious the how many people got the before me - I am able to get this information python 2019-01-02 09:09:15 Gold 454 with this (slow running) query: (I was unable to single/cross ...