Most voted "performance" questions
For questions involving measurement and improvement of code efficiency
Learn more…479 questions
Sort by count of
-
3
votes1
answer142
viewsPerformance Itextsharp
I’m doing the reports using iTextsharp and the result has been acceptable, but working with many records has become slow. Currently I do so: I capture the database data (storing in a DataTable); In…
-
3
votes1
answer74
viewsHow does CPU cache performance work?
Recently I discovered that it is possible to get a huge performance when using the CPU cache. An example I saw was a program that reduced its runtime from 10 seconds to 200 milliseconds just using…
-
3
votes1
answer55
viewsProcessing time and clock time
What is the difference between processing time and clock time?
-
3
votes1
answer75
viewsSonarlint x Java GC, cancel or not object at the end of the execution?
I am passing Sonarlint in a somewhat old application and fixing several "problems", but I came across a code snippet similar to: public void fazerAlgo(final String param) { MeuObjeto m = new…
-
3
votes2
answers268
viewsOpen and close the code or use variable?
Two scripts with the same result: Example 1: <?php ...códigos PHP acima... $tabela = '<table>'; $tabela .= '<tr>'; $tabela .= '<th> Valor1 </th>'; $tabela .= '<th>…
-
3
votes1
answer123
viewsManage Datatable with lots of information
I have here a "small" problem with a DataTable. From an SQL query I am getting a huge amount of records (> 1,000,000), and although the consultation is relatively quick, the loading of the…
-
3
votes1
answer973
viewsWhy doesn’t Python use 100% of the processor?
I’m developing a Python application where in some parts, it requires a lot of CPU for calculations. However, I realize that even at these "bottleneck" points, the CPU never reaches more than 50% of…
-
3
votes1
answer224
viewsIs there a difference in finding the maximum value directly in SQL or checking it with PHP?
I saw in a question on the site a user get the maximum value of a given column of a table in the database as follows: $result_max = mysqli_query($conn, "SELECT CGenericas1 FROM…
-
3
votes1
answer91
viewsExcessive use of pens c#
Good morning friends, I am developing an application that should draw 4 graphics (for now), to draw in the way intended need to redraw the graphics several times and update them. With excessive use…
-
3
votes3
answers85
viewsAre the variables of a function automatically deleted after its termination?
I am developing a function that has variables that carry a lot of data and as these variables are used only within this function it does not make sense that they continue occupying space in memory,…
-
3
votes1
answer126
viewsPerformance according to box control modeling
I am making a system for daily box control, which allows launches/deletion of values. Below is the table that will store the values, filled with some data to exemplify. There are more fields, but…
-
3
votes2
answers560
viewsHow to improve the performance of the Linq query?
I have the consultation below var f = (from l in fpcList join fpp in FPP on new { l.fpId, l.etId } equals new { fpp.fpId, fpp.etId } join fpcp in FPCP on fpp.fppId equals fpcp.fppId select new {…
-
3
votes1
answer91
viewsHow to use indexes beyond the primary key?
I have a question about that. Consider a table with the following columns: id (chave primaria), cliente, cidade, estado I already understood that a consultation with condition WHERE id = X would…
-
3
votes2
answers515
viewsJava 8 stream - performance improvement
I am implemented a method that receives an integer value k (representing the amount of "vacancies") and two lists (p and q) of Integer and perform some operations. Using stream, check which elements…
-
3
votes1
answer53
viewsWhat are the differences between setInterval x requestAnimationFrame?
I am creating an application where I need to check if an X element was created on the page and thus take some actions. To make that check, I’m using the setInterval. A few minutes ago, I remembered…
-
3
votes1
answer101
viewsImprove performance in iteration
I have a C# method that receives a List<string> and I must return a string with the list of members of the List<string> ordered by number of occurrences and then alphabetically. I did…
-
3
votes1
answer510
viewsBest worst case sorting algorithm
I want to know which algorithm has the best performance when dealing with its worst case compared to others dealing with each with its own worst case, all applied in array ordering. To better…
-
2
votes2
answers1830
viewsPerformance in Java repeat loops
What is the difference in performance between the three types of ties highlighted below. List<Foo> list = new ArrayList<Foo>(); for (int i = 0; i < list.size(); i++) { //CODE } for…
-
2
votes2
answers304
viewsHow to free up memory after using a Filererence?
FileReference.load does not have a function to download, just as there is new Loader().unload. Must be a Flash BUG or Filereference needs to be improved, like in a new version add a function like…
-
2
votes3
answers28024
viewsSUBSELECT vs. INNER JOIN
Is there any recommendation on which of the two is preferable in terms of performance? SELECT funcionarios.nome FROM funcionarios INNER JOIN empresas ON empresas.id = funcionarios.empresa_id WHERE…
-
2
votes0
answers55
viewsProblems when closing RAD screen splash (v7.5)
I’m having an unusual problem (who doesn’t?), My Launcher/splash screen opens, but it keeps this state even after I choose the desktop and after RAD loads the project. It only closes when I stop all…
-
2
votes1
answer98
viewsIs it possible to encode line by line in Base64?
I have a code that takes binary files and converts them into Base64, but there are very large files and this ends up using much of the machine’s memory (and even process). To read large files…
-
2
votes2
answers121
viewsWhich of these three codes is the most recommended in memory and speed?
I would like to know which of these codes would be more recommended for speed, since the three do the same job: 1 $rand_length = 1; $rand_rules = range(0, 9); shuffle($rand_rules); $rand_rules =…
-
2
votes1
answer359
viewsBetter performance in a WPF system
How to leave a system in high performance? Follow a MVVM project pattern? I have the following XAML, but when I run it hangs in time to pass the focus to others textBox. Why? My system is too slow,…
-
2
votes2
answers2828
viewsCURSOR vs table variable type
I’m facing one of those situations where I need to perform an action for each line resulting from a query. This way I have two options, use a Cursor or a Table Variable, but the two seem very…
-
2
votes1
answer224
viewsBetter performance/performance: Smarty, Twig or any other?
Although in general the systems of templates for PHP are used for other purposes, such as separating business rules, etc. Which one provides better performance for website loading/performance (or…
-
2
votes2
answers199
viewsHow to monitor a C code on Linux
I was trying to use top to monitor the performance of my codes in c, but when I run the program does not appear. Is it just not visible, or can’t monitor code in c using the top? What should I use…
-
2
votes1
answer337
viewsSite . NET with high performance
I will start building a website to purchase tickets and the access forecast to main page is 8000 users per minute. We must use C# . NET and MVC. The database, design standard, ORM and frameworks are…
-
2
votes2
answers757
viewsNULL value in database x performance
I always used database (Mysql) for small projects and never cared about the option "NULL when empty", IE, was blank even. Now I’m designing a big system, I’d like to know the concept of using value…
-
2
votes1
answer130
viewsWould Bigpipe be applicable in this case?
I was reading about how big web-sites work and I got to know Bigpipe. What is Bigpipe (kids) Bigpipe was a feature created by facebook, what it does is make page loading time faster, page content is…
-
2
votes1
answer56
viewsImprovement in Chat application
I am developing a chat for my site where a user sends an invitation to the other user, if the same accepted will be open and the system will be checking new messages. For the system to do this check…
-
2
votes1
answer182
viewsProblems with Python performance testing
A group of friends and I are starting an initiative to create a Reset on github in order to test the performance (benchmark) of http services implemented in various languages and frameworks. One of…
-
2
votes1
answer72
viewsReset a variable, or recreate it?
In terms of performance, what is more preferable? There are other differences between the two modes than performance? Reset a variable multiple times? Private Sub Metodo() Dim MeuTipo As Tipo For i…
-
2
votes3
answers76
viewsIs there any difference in performance depending on what you seek?
There is some difference in performance when searching the database, depending on the number of characters reported in the query? For example, if a query is made for any record that has the…
-
2
votes2
answers896
viewsStruct or Classes, huh?
I made the code using structure, I wanted to know if with classes it would be more efficient. I’m doing it in C++ Builder. The idea of the code and the following: create a list of problems, where…
-
2
votes1
answer53
viewsIn terms of performance, what is the best way to declare a variable that will be used in multiple Actions/Methods in a class?
Which mode is best performatically speaking? Which way you recommend and why? //Modo 1 MeuManager mm = new MeuManager(); JsonResponse MetodoDOIS(string urlImagem) { var abc = mm.Lista(); }…
-
2
votes2
answers44
viewsWhich way to change variables is more optimized?
I made two ways to change the value a and b, but which is more optimized, taking this example to other languages like desktop or web. No use auxiliary variable: $a = 10; $b = 5; $a = $b+$a; $b =…
-
2
votes0
answers87
viewsRoofline model
I have a TPC for a college discipline (Advanced Computer Architecture discipline), in which I am asked a question to obtain the maximum attainable performance in GFLOP/s. After some intensive…
-
2
votes2
answers248
viewsWhat is the best method to access a class member?
What is the best method to access a class member for speed and organization? class cMinhaClasse { public: void Funcao(int r); }; int main() { // Método 1 - Acessando classe por ponteiro cMinhaClasse…
-
2
votes1
answer1751
viewsImprove slow query performance on MS SQL SERVER
The indexes are incorrect? I’m having trouble optimizing a consultation. I had done another question for a simpler case that solved, but for this case I’m not getting a better result. The following…
-
2
votes2
answers136
viewsHow does -O3 optimization break some programs?
When compiling my own programs, I have the freedom to change some flags compiler and start using optimization -O3. This optimization manages to break some programs. I understand that the compiler…
-
2
votes1
answer194
viewsDifference between Std::map, Std::unordered_map, Std::flat_map, and which one to choose?
What is the difference between library functions map, unordered_map, flat_map, and which one to use, for example in terms of performance?
-
2
votes1
answer115
viewsDifference between :80 and other doors
I have a hosting problem where I will not be able to raise my application in the standard port :80, as a solution presented to me have indicated to climb it in a different door, example :3000, and…
-
2
votes3
answers725
viewsASP.NET MVC Web - How to separate performance between the modules of a project?
Explaining the doubt. Within my system there are some menus, we will use as example 3, naming them A, B and C, each being a CRUD module with some kind of report. If 300 people are using module A, it…
-
2
votes2
answers81
viewsAre there "problems" using jQuery’s small?
For example, some parts of a site, I can not fully touch the HTML, put the platform blocks for "security" and does not let modify, so I use jQuery/Javascript to make the modification I need. Does…
-
2
votes0
answers142
viewsPostgresql - autovacuum in small table
What would be a suitable configuration for autovacuum act in this table ? We have a "sequence" table, does what the sequence postgres should do, but perhaps by using other banks the development…
-
2
votes2
answers67
viewsWhat is the best performance in comparison of string sizes?
What is the best performance option? And memory allocation? Using option 1 or 2? String text = "ola mundo"; Option 1: If ( Strings.len(text) > 0 ) {} Option 2: If ( text != "") {}…
-
2
votes1
answer91
viewsISA x Performance
How can the amount of instructions (ISA) affect a system’s performance analysis? Compiler can help improve results?
-
2
votes0
answers125
viewsArray sorting with heapsort simulating multi-child tree
Doubt: To order arrays with heapsort, it is customary to simulate in them trees with up to two children per parent, no longer. My question is whether there are studies, implementations, experiments,…
-
2
votes1
answer50
viewsWebpack Optimization of Minification
I’m starting with the Webpack and I’m learning how to work Config of it, and I’ve seen some of the documentation that deals with Resolve.extentions, I found it really cool because you can hide the…