performance

Program Execution Speed Testing

I have a C# app in which I am testing 3 ways to do something with XML. I read a string of XML get a value out and then add it to a custom collection. I am testing XMLDocument, XDocument and String manipulation to find the node value, in that order recording a start and end time for each. However if I say mix the order up I get differe...

Degraded performance of a query after adding Index

Hi, I have a query which part of a SP which is executed fairly regularly, and the query took a while to execute, so I decided to have a look at it. I did an autotrace on the query, and this was the execution plan returned [ pasted in pastebin due to excessive size ] I added indexes on the tables which was undergoing full table access,...

Performance loss due to add asp.net_isapi to request pipeline?

Hello, is there a notable performance loss if all files are handled with the aspnet_isapi in request pipeline using IIS6? IIS7 has the new integrated pipeline so that seems not to be a problem. I ask this, because I want apply an .net url replacer on .exe files for example. To do so, I have to add them to the asp.net isapi. I fear this ...

What are the performance implications of using 'Using' on sqlConnections

I came across an article saying that using my sqlConnection like this : using (SqlConnection sqlConnection = new SqlConnection(Config.getConnectionString())) { using (SqlDataAdapter dataAdapter = new SqlDataAdapter(query, sqlConnection)) { dataAdapter.Fill(dataSet); ...

SQL Inline or Scalar Function?

Hi, So I need an SQL function that will concatenate a bunch of row values into one varchar. I have the functions written but right now I'm focused on what is the better choice for performance. The Scalar Function is CREATE FUNCTION fn_GetPatients_ByRecipient (@recipient int) RETURNS varchar(max) AS BEGIN DECLARE @patients varchar(m...

Can making a method static improve performance, and under what circumstances?

When, if ever, is it faster to pass arguments as arguments to a static method rather than have the method be non-static and access the same values via instance members. Assume the method accesses these members in a read-only fashion. All other things being equal, calling a static method is slightly faster than calling an instance metho...

What's the fastest way to iterate over an object's properties in Javascript?

I know that I can iterate over an object's properties like this: for (property in object) { // do stuff } I also know that the fastest way to iterate over an array in Javascript is to use a decreasing while loop: var i = myArray.length; while (i--) { // do stuff fast } I'm wondering if there is something similar to a decrea...

Java Program Performance (running time & memory consumption)

Which tools can I use to know the life-time or run-time of a program(from the beginning until the program ends)? I also want to know how much memory that program consumes from start to end. The program is written in Java and I'm running it on Windows XP. ...

Mysql Show Process - Sleep Commands and what to do..

I'm wondering if There is something that I can do to better get keep my process list clean when initiating commands with MySQL. Currently I have been seeing a lot of: 17325 user_a localhost db_1 Sleep 1132 NULL 17464 user_a localhost db_1 Sleep 1124 NULL 17983 user_a localhost db_1 Sleep 1078 NULL ...

What are your experiences with Content Delivery Networks (CDN) ?

What are your experiences with CDNs regarding ease of development, support, performance, pricing, etc? I am planning to use it to host a big number of images. ...

Remote SQL Server 2008 performance

My company has recently put up a demo database on his remote servers to allow some of our partners to test our beta version of the software. We noticed, as expected, some bottlenecks in some parts of the program, in particular on the places in which many queries are done. For example, I have to load customer from database, with all...

Tomcat and MySql on VPS

I am doing some experimentation with VPS before moving my application from private Tomcat hosting to cloud. It is a read intensive app built on Struts 2 + Spring + Hibernate + MySql. Its a moderately popular app in India with 1500 visitors and 10,000 pageviews per day. I have some basic questions about choosing a server configuration. 1...

C# DataSets batch updates

I have a number of rows to update/insert to a SQL Server database using TableAdapters. Is there a way to batch them together, so that while it's still a list of UPDATE statements, at least it's only one remote call to the database? If I was writing SQL manually, it would be a single SqlCommand object with a CommandText that looks somet...

Efficiency of C vs Assembler

Hi all, How much faster is the following assembler code: shl ax, 1 Versus the following C code: num = num * 2; How can I even find out? ...

Fastest nested loops over a single list (with elements remove or not)

Hello, I am looking for advice about how to parse a single list, using two nested loops, in the fastest way, avoiding doing len(list)^2 comparisons, and avoiding duplicate files in groups. More precisely: I have a list of 'file' objects, that each has a timestamp. I want to group the files by their timestamp and a time offset. Ex. star...

High performance comparison of signed int arrays (using Intel IPP library)

We're trying to compare two equally sized native arrays of signed int values using inequality operations, <, <=, > and >=, in a high performance way. As many values are compared, the true/false results would be sotred in a char array of the same size of the input, where 0x00 means false and 0xff means true. To accomplish this, we're usi...

Slow performance on asp.net website, where to start looking for the problem?

I have developed a site using Asp.net C# 3.5 and now I feel that some of the pages are loading reeeaaally slooooow. I now need to start going through the website and try to find out whats making it so slow. But I don't know where to start, whats most likely causing the problem? Where do you usually start when trying to find out what is w...

Performance surprise with "as" and nullable types

I'm just revising chapter 4 of C# in Depth which deals with nullable types, and I'm adding a section about using the "as" operator, which allows you to write: object o = ...; int? x = o as int?; if (x.HasValue) { ... // Use x.Value in here } I thought this was really neat, and that it could improve performance over the C# 1 equiva...

Performance differences between Swazoo and Komanche?

Hello, I'd like to know what the performance differences between Swazoo and Komanche in general and for Seaside are. Especially why and in what situations I should prefer the one over the other? ...

Filter out rows by hardcoded list in MySQL performance

Hello, I have a hardcoded list of values like: 1,5,7,8 and so on. And I must filter out rows from table that have ID in list above, so I do something like this: Select * from myTable m left join othertable t on t.REF_ID = m.ID where m.ID not in (1,5,7,8...) But when I have more values (like 1000) and more rows (100) in other...