返回首页
We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [performance]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

mongodb - retrieve multiple documents efficiently

I want to download ~100K records from mongodb. Using pymongo. find() returns cursor, which, i guess, go to the db (cloud) for each single doc. This takes ~0.003 per document, not so good. Is there ...
0
votes
0answers
10 views

Design patterns to increase the performance of rails application?

I was looking for design patterns to follow in large rails application. List of useful concepts to increase the performance of a rails application ? Like : 1. Bridge To avoid n+1 query. Can you ...
0
votes
0answers
8 views

Fetching and inserting data to SQLite database in AsyncTask freezes the UI

I'm trying to build a offline quote app and I have about 5000 quotes in my server showing them in JSON format, I want to fetch the url and insert the data into SQLite database in an asynctask. How can ...
0
votes
0answers
17 views

Plot Function Performance (Computational Speed) in Python

I'd like to compare two functions for solving a specific task (converting from string to datetime structure). What would be an effective way to measure the speed of these functions to be accessed for ...
-1
votes
1answer
27 views

Several asynctask or only one?

I create a code that analyzes the audio signal, I divided it into 4 parts: An AsyncTask that recovers audio from the microphone via AudioRecord. An AsyncTask that applies an FFT and normalizes the ...
-4
votes
0answers
33 views

CheckPalindrome codeSignal 18/20 test [on hold]

I am having a problem with this code boolean prueba = false; int i = 0; if (!inputString.equals(null) && !inputString.equals("") ) { int b = inputString.length() - 1;...
0
votes
1answer
26 views

RecyclerView Scrolling problem with complexity item

I facing laggy scrolling issue with complexity item. I trying to build a view like this image below. Many more item like this I tried to #setHasStableIds #hasFixedSize #PreCacheLinearLayout #...
0
votes
0answers
35 views

Is implementing a javascript class in multiple files like this good practice?

I'm currently handling a huge project which contains class implementations of more than 8000 lines. I don't want to create subclasses to group functions because it makes a namespace mess. What I've ...
1
vote
1answer
25 views

Laravel - How to pass cached value to multiple views without extra requests?

Have several data collections that are retrieved from cache and need to be passed to several different views. For performance optimization need them to be retrieved only once, without extra requests ...
1
vote
0answers
22 views

Efficiently calculating distance of pixels to their corresponding epipolar lines

I'm trying to calculate the distance of two corresponding pixels in a stereo camera setup to their respective epipolar lines. The code I Implemented for this purpose looks is the following: #include &...
-1
votes
1answer
20 views

Slow SELECT optimization with JOINs

My database consists of the following tables: articles, prices, suppliers, manufacturers and others. CREATE TABLE `articles` ( `id` int(3) NOT NULL, `name` varchar(255) COLLATE utf8_bin NOT NULL, ...
0
votes
0answers
20 views

Release Apk is not installing in Honor 6X-BLN-L22

I am trying to install release Apk(apk shared using whatsapp), it is working on moto and lenovo but not in Honor 6X-BLN-L22 When tring to install it is going to settings page to asking to enable/allow ...
0
votes
0answers
15 views

Using the AMP v0.js engine to load pages faster on the Intranet

Total newbie to AMP. Just noticed that on a simple HTML page with large amounts of text, the loading time (First Paint, First Contentful Paint) is dramatically improved if I just add a reference to v0....
0
votes
2answers
56 views

“Recycling” items in iterators for better performance

I have a file that contains multiple instances of some complex data type (think of a trajectory of events). The API to read this file is written in C and I don't have much control over it. To expose ...
0
votes
0answers
58 views

if-else VS map lookup

std::string v = GetV(); if(v == "AAA") { func1(); } else if (v == "BBB" || v == "CCC" || v == "EEE") { func2(); } else { func3(); } Basically I want to do the conditional process just ...
0
votes
1answer
20 views

Android Camera 2 API - Speed-up preview

I am previewing a USB camera on TextureView on Android device. I've observed slowness in rendering. Scenario is - there is an object (say a bottle) where camera is focused. There are colorful lights ...
0
votes
2answers
42 views

Sorting performance comparison between numpy array, python list, and Fortran

I have been using Fortran for my computational physics related work for a long time, and recently started learning and playing around with Python. I am aware of the fact that being an interpreted ...
0
votes
1answer
33 views

Oracle SQL self join performance

lets say I have a table called order with following data. I need to get the customer_name along with the no. of orders they have placed. Table name: order id | customer_name | item 1 | Siddhant ...
0
votes
1answer
9 views

Datastage performance statistics

we have datastage jobs on production that recently stop showing performance statistics. We already made sure that we have enough memory for the logs and we didn't see any errors in jobmon.log and ...
0
votes
0answers
18 views

Issue while recording data and uploading to FTP

I am trying to record real time data and upload it to FTP server. My script works, and the first few days there were changes. The first few days of real time data showed time intervals of 00:10:00, ...
-2
votes
1answer
17 views

Is there program that creates a program that creates another program?

Let's say we have the main program, let's call him program 'M'. So 'M' is a program whose only function/method is to create an object/program called 'x'. And 'x' can only create another object/program ...
0
votes
1answer
34 views

Way to filter multiple conditions in Power Query from folder containing CSV files

I need a help from you with correction/suggestion of query I am using to get a data from folder in CSV format. Warning upfront: I don't know, how to write this shortly. Few informations first: Tools ...
-3
votes
0answers
20 views

store billions records for further analytics [on hold]

i have near billion lines that includ two fields field1 field2 field1 can has more then one value ~350million lines of field1 and each from field1 can have 1 to 500 value (as field2) , i want to ...
2
votes
1answer
78 views

Get nanoseconds since midnight with the lowest latency

I'd like to get the current number of nanoseconds since midnight, with the lowest latency. My platform is Linux/Centos 7 with Clang. I do not care about portability. I found this <chrono> ...
1
vote
0answers
31 views

Variable event count based sampling using perf

I am trying to read the PMU event counters whenever a particular event counter overflows using perf. I know that perf works with fixed sample period. What i am looking for is the possibility to read ...
0
votes
0answers
18 views

Best way to (temporarily) collect and count data

In my Android app, I have to collect and count some informations. I don't need to save them in database or in another place, I just need to put them in memory and use for some processing. All the ...
0
votes
0answers
23 views

Query through intermediate models that returns multiple results, using Django Q object

How to follow an intermediate 'through' model, in a Q object? I'm trying to get a list of the ids of all Property objects that a User is a member of, in one query. A User is a member of a ...
4
votes
0answers
100 views

Why is SSE4.2 cmpstr slower than regular code?

I'm trying to validate a string that must only contain ASCII visible characters, white space and \t. But it seems that ASCII table lookups are faster than the _mm_cmpestri instruction with ...
0
votes
0answers
36 views

How can I optimize this? Is there any alternative way to this

I am trying to remove all occurences of the words i collect in the list Exclude from every text note. This is my approach. import operator,re exclude=[] for i in range(len(freq_select)): if ...
0
votes
1answer
12 views

What nginx.conf file should I configure?

I'm trying to performance_tune My Tuleap 11.8 Service which run on NginX server. I know what parameters to tune. But there's many .conf files there's: /etc/nginx/conf.d/tuleap.conf /etc/nginx/nginx....
0
votes
1answer
15 views

Map.setAll instead of multiple map.set calls

With map.set(key, value) you can add (or overwrite) a value for a specific key in the map. If you have a big list of key-value pairs you need to add them all to the list separately: [['keyA', '...
0
votes
1answer
24 views

Importance of number of Swaps in analysis of the sorting algorithm - Three-Way Partitioning

I'm developing a Three-Way partitioning algorithm for sorting the data. I could observe that for few distinct elements in large data set the number of comparison made by algorithm is less than ...
0
votes
1answer
16 views

Do I need pipes with ChangeDetectionStrategy.OnPush

Now I use pure pipes instead of method calls in templates for performance reasons (I just wrap method calls in pipes) I noticed that now I use ChangeDetectionStrategy.OnPush and async pipe in all ...
1
vote
0answers
13 views

MongoDB with atomic FindAndDelete operations as a poor man's queue replacement?

Using FindAndDelete would imply that we read only one message per request from concurrent consumers. We will have a max of 100-150 reads/second. We have a fairly large Mongo Atlas cluster. The ...
0
votes
0answers
26 views

How to save what the user is typing as they're making a post? [on hold]

I'm looking to implement similar functionality to what StackOverflow does, on my site, such that if the user navigates away from the post as they're typing it, it's saved for when they get back. ...
1
vote
2answers
65 views

how could i optimise this python loop?

I am running this code on a large csv file (1.5 million rows). Is there a way to optimise ? df is a pandas dataframe. I take a row and want to know what happens 1st in the 1000 folowing rows : I ...
0
votes
0answers
27 views

Optimizing texture fetches with higher mip levels

Let's say I have some shader program in DirectX or OpenGL rendering a full screen quad. And in a pixel/fragment shader I sample some huge textures at random texture coordinates. That is one same ...
1
vote
4answers
70 views

Do single threaded programs execute in parallel in a CPU?

While measuring the CPI (cycles per instruction) of an Intel 4th Gen i5 we got a CPI < 1. Some of the classmates suggested that it was due to parallel execution of the code, but it was a single-...
2
votes
1answer
126 views

Does inheritance really not affect performance?

I have found on the internet (here and here), that the inheritance doesn't affect the performance of the class. I have become curious about that as I have been writing a matrices module for a render ...
0
votes
1answer
47 views

Hotspot loop optimisation - specific example

Below is the most expensive part of the algorithm I'm developing. Definitely a hotspot, by far - checked through VisualVM. This is already after some optimization tricks like unfolding 3 ds rows. Of ...
0
votes
0answers
21 views

Spring Data JPA takes 10x than plain JDBC

I am looking into our DAO layer slow response time issue in Production environment. One of interesting thing I found is that Spring Data JPA is taking 10x more than what it takes to run same query ...
0
votes
1answer
21 views

How to convert a very large Laravel application into static site?

I've a really large Laravel application (hundreds of routes, thousands of possible pages etc). About three quarters of the pages don't change often (they change at max once in 2-3 months when the data ...
0
votes
0answers
11 views

McNemar's chi-square test for comparing two classifier algorithms

I want to compare the classification performance of Random forest with variable selection algorithm (method A) and Random forest only (method B). The original dataset has 120 variables. After using ...
2
votes
2answers
56 views

case sensitivity affects SQL parsing in oracle DB

I know select * from employees; and select * from Employees; will generate 2 diff SQLids and hash value but eventually use same hashplan value. So it this soft parse or hard parse? and will both ...
0
votes
0answers
16 views

Are there some common techniques for Java Web Servers to detect when approaching overload?

In a period where microservices become more and more predominant, I was wondering if there are some common techniques by which Java Web Services detect overload before start deteriorating. ...
19
votes
6answers
1k views

Idiomatic way to distinguish two zero-arg constructors

I have a class like this: struct event_counts { uint64_t counts[MAX_COUNTERS]; event_counts() : counts{} {} // more stuff }; Usually I want to default (zero) initialize the counts ...
-1
votes
3answers
66 views

Find and extract an html tag from a large page

Figuring a very long html page as a string. How to extract a tag with its content? Any long Wikipedia page illustrates the thing Using a parser like cheerio is excluded for performance reasons. Using ...
2
votes
1answer
58 views

Why does re-initializing a register inside an unrolled ADD loop make it run faster even with more instructions inside the loop?

I have the following code: #include <iostream> #include <chrono> #define ITERATIONS "10000" int main() { /* ====================================== The first case: the MOV is ...
0
votes
3answers
59 views

Fast computation of logic gates

I created the following code to compute the result of a logic gate (AND, OR, NOT). The function will be used in a circuit simulation where the circuits are read from a netlist file. A circuit could ...
0
votes
0answers
19 views

Numpy Matrix values to complex values in the form of 0+Value*i

I have a matrix in the form of a = numpy.matrix('1 2 3; 4 5 6', dtype=complex) of course giving the output: a = [1 2 3; 4 5 6] I'm trying to get this matrix to the form of: a = [0+1*i 0+2*i 0+3*i; ...

返回首页
杏彩计划 杏彩官网 杏彩APP 杏彩走势图 杏彩下载 杏彩官方 杏彩网站 杏彩怎么玩 杏彩官方 杏彩靠谱吗 杏彩代理 杏彩骗局 杏彩投注 杏彩倍率 杏彩开奖 杏彩漏洞