performance

Process.Start Performance

I've scoured the internet and this site in search of an answer to my problem to no avail. I'm completely out of ideas and desperate for answers! The issue: When I run a specific processor intensive executable from a .NET environment (using Process.Start()), the process takes upwards of five minutes to complete. In contrast, when I run ...

In ADO.NET, is a DataTable or a DataReader better to serialize?

I have static data in a single table which I must serialize. I have often read that a DataReader is more performant, if you wish to have read-only data that you traverse only once. If you wish to serialize this information however, would a DataTable be better? ...

SQL INNER JOIN question

Hi, I'm creating a query that will display information for a record which is derived from 8 tables. The developer who originally wrote the query used a combination of 'where this equals this' AND 'this equals this' to create the joins. I have since changed the query to use INNER JOINS. I wondered if my approach was better than utilisin...

Does ISNULL or OR have better performance?

I have the SQL query: SELECT ISNULL(t.column1, t.column2) as [result] FROM t I need to filter out data by [result] column. What is the best approach regarding performance from the two listed below: WHERE ISNULL(t.column1, t.column2) = @filterValue or: WHERE t.column1 = @filterValue OR t.column2 = @filterValue UPDATE: Sorry, I ha...

What is the most "expensive" for a server: connections opened, send/receive messages or connections/deconnections ?

What is the most expensive for a server (using Java NIO Selector and SocketChannel, but I guess the language and library don't matter anyway) keeping many client connections opened many client connections/deconnections receiving many messages from clients and answering many messages to clients ...

Performance of resolving EL Value Expressions

I have a JSF2 application that renders a large table with complex content. Unfortunately, each request takes up to 6 seconds to process. Using simple debug output inside a phase listener, I could see that the performance loss distributes evenly over all phases that process the component tree. So I started up a profiler to see what's goin...

badoo.com user search - how can this be done?

Badoo.com has 56.000.000 user profiles. Profiles can be searched by sex, age, hair color, zodiac, education and so on, plus distance from my hometown, online status and date of registration. So far, this seems doable even if it's quite some query on huge tables (56m members...), it can be cached in a general way. The interesting part is...

Why would an IN condition be slower than "=" in sql?

Check the question This SELECT query takes 180 seconds to finish (check the comments on the question itself). The IN get to be compared against only one value, but still the time difference is enormous. Why is it like that? ...

Performance Problems - Large DLLs and Large Namespaces

This is sort of the next step of the LINQ to DB2 question I asked here. Following zb_z's answer, I poked around a bit with the code for DB_Linq and have managed to add working DB2 support. (It's still in its infancy now, not ready to be contributed back to the project yet.) The proof of concept worked great, it was pretty exciting act...

performance of custom controls

In terms of performance. Is it a good idea to build your own data grid (assuming you have the time) having in mind that you will create one that match perfectly your need? Getting rid of many unnecessary properties and methods. The rendered page might be smaller making the download faster? thanks ...

C++ Performance of structs used as a safe packaging of arrays

In C or C++, there is no checking of arrays for out of bounds. One way to work around this is to package it with a struct: struct array_of_foo{ int length; foo *arr; //array with variable length. }; Then, it can be initialized: array_of_foo *ar(int length){ array_of_foo *out = (array_of_foo*) malloc(sizeof(array_of_foo)); out...

Perl modules: MySQL vs DBI

A lot of our automated processes use perl and need to access our MySQL DBs. I hate to admit it, but up until recently we haven't really done much benchmarking with the majority of our processes. One of our devs setup a test to compare the performance of "use MySQL" vs "use DBI" with the following pseudocode: for ($i = 1; $i <= 1000; $...

Efficiency of design patterns

Hello, Does anyone know any sites/books/articles covering best practices or theory around design patterns in high performance applications? It seems a lot of the patterns use indirection/abstraction/encapsulation in a way that may affect performance in computationally intensive code. Head First Design Patterns and even GoF mention possi...

is .find() faster than basic descendant selecting method?

In Paul Irish's blog http://paulirish.com/2009/perf/, in slide 30 it is mentioned: $('#container').find('div.robotarm') is faster than $('#container div.robotarm') What's your opinion? ...

what are the steps/strategy to analyze and improve performance of an embedded system

I will break down this question in to sub questions. I am confused if I should ask them separately or in one question. So I will just stick to one SO question. What are generally the steps to analyze and improve performance of C applications? Do these steps change if I am developing for an embedded system? What tools are out there whic...

Client Server Performance - very long distance

Hi We have a site hosted one side of the planet and a customer on the other. Its asp.net and theres load of complex business rules on the forms. So there are many instances where the user takes some actions and the site posts back to alter the form based on business rules. So now the customer is complaining about site lag. For us, ...

Why is Date1.CompareTo(Date2) > 0 faster than Date1 > Date2?

Another "unimportant" performance question. Unimportant because mostly code-readability is much more important than a few milliseconds, but interesting anyway. I noticed that there are differences between different DateTime Comparisons. I checked 3 alternatives: Dim clock As New System.Diagnostics.Stopwatch Dim t1, t2, t3 As Lo...

Many nested BufferedInputStream's - what's the impact?

There's a common pattern, when each layer of application, dealing with data from a stream tends to wrap it into a BufferedInputStream, so that at a whole, there's a lot of buffers, filled from buffers, filled from buffers and so on. I think this is bad practice and want to question: how does it impact the performance? Can this cause bu...

Twisted: degrade gracefully performance in case reactor is overloaded?

Is it somehow possible to "detect" that the reactor is overloaded and start dropping connections, or refuse new connections? How can we avoid the reactor being completely overloaded and not being able to catch up? ...

Will reducing number of includes/requires increase performance?

Hello, What is better practice for script performance tuning? This one? require_once("db.php"); if (!is_cached()) { require_once("somefile.php"); require_once("somefile2.php"); //do something } else { //display something } Or this one? require_once("db.php"); require_once("somefile.php"); require_once("somefile2.php"); if...