performance

.NET Framework - Any way to get Dictionary<> to be a little faster?

I'm doing a Dictionary<> lookup in an O(n^2) loop and need it to be ridiculously fast. It's not. Does anyone have any insight into how Dictionary<> is implemented? I'm testing Dictionary performance with an isolated test case after running my code through a profiler and determining Dictionary lookups are the bulk of the CPU time.. My...

Is it possible to measure the performance of the language ?

Do most languages have many different execution engines ? ...

NCHAR(1) vs BIT

I'm working under refactoring of database (SQL Server 2008) scheme and gather arguments to change NCHAR(1) columns (which keep Y|N values) to BIT. Everybody understand this is necessary and don't know why does it take place but this change affects production database so weighty arguments are required. Table keeps address catalog (up to 1...

Recommendations for best SQL Performance updating and/or calculating stockonhand totals.

Apologies for the length of this question. I have a section of our database design which I am worried may begin to cause problems. It is not at that stage yet, but obviously don't want to wait until it is to resolve the issue. But before I start testing various scenarios, I would appreciate input from anyone who has experience with such...

Improve performance of MS Excel writing

Hi, I am facing performance issues while reading/writing data from/to MS-Excel cells. I am using MS Excel 11.0 object library for automation with VB.NET. Currently it takes too much time to read and write from/to Excel files. (10 mins to read 1000 rows :( ). It seems the cell-by-cell reading and writing approach is not that effiecient....

Pros and Cons of Keep-Alive from Web Server Side

Keep-Alive connection feature in HTTP protocol is meant to reduce TCP connection hits to web server. It should be able to improve web server performance. However, I found that some web servers deliberately disable KeepAlive feature from server side. In my understanding, some reverse proxy, i.e. HAProxy, disables HTTP keep-alive in orde...

SQL Server: How can a table scan be so expensive on a tiny table?

Hi all I'm looking at an execution plan from a troublesome query. I can see that 45% of the plan is taken up doing a table scan on a table with seven (7) rows of data. I am about to put a clustered index to cover the columns in my query on a table with seven rows and it feels...wrong. How can this part of my query take up so much o...

Continuous Performance Monitoring of .NET Applications in Production?

Given a relatively typical .NET 4 system in an SOA environment (i.e. Windows Server 2008 R2, RESTful Web Services on IIS 7, Windows Services for NServiceBus messaging, SQL Server 2008 R2, etc) what are the best practices or de facto solutions (without enterprise price tag) for performing 24x7 performance monitoring in production? Not n...

Performance implications of using Functional style Javascript vs "procedural"

Has anybody done benchmarking, or can link to an article on this subject? Particularly interested in IE results, since usually JS performance is not a problem in other browsers. I would like to know how much slower it is to do something like: var numbers = [1, 2, 3, 4, 5, 6, 7]; var results = numbers.map(function() { // do some stuf...

Strange lag in http pipeline with ASP.NET MVC on IIS6

I have an ASP.NET MVC application running on IIS6 with enabled wildcard mapping. After performing some load tests I digged into log files with focus on the slow requests. I have a log file from the load testing application, IIS log file and the log file from the IHttpModule I develop for this purpose which records time of Application.Beg...

Why is this CATiledLayer/PDF code slow?

Here is the code: http://dl.dropbox.com/u/5391413/PDFScroller.zip I took the WWDC 2010 PhotoScroller sample code that implements nested UIScrollViews for zooming, inside a UIScrollView for paging, and swapped out what I thought would be minimal amount of code required for displaying a multi-page PDF instead of images. It works. But it...

Log memory usage of application pool using perfmon

I am trying to audit memory usage of applications using perfmon. The application pool processes in perfmon by default looks like w3wp.exe #1, w3wp.exe #2... Microsoft has a KB article http://support.microsoft.com/default.aspx?scid=kb;EN-US;281884 which shows how to associate PID's to processes. But PID's change when an application pool i...

jQuery.addClass() behaviour, all at once

I have this simple jQuery call to highlight a bunch of elements (couple thousand): jQuery(elem).addClass('highlighted'); What the browser does is it quickly adds the class, but does not repaint the element. Is there a way to render each "highlighted" element as soon as i add the class. Right now the user sees a stutter until my loop o...

Java Performance using Concurrency

How can I improve performance of this chunk of code ? What would be unit test case for the given problem statement ? Code: public class SlowDictionary { private final Map<String,String> dict = new HashMap<String,String>(); public synchronized String translate (String word) throws IllegalArgumentException {...

Triple Play Test using PIC24 micro-controller

Hi Geeks, Can anybody suggest me if I can program my device as Triple-Play-Tester? My device has PIC24 processor and ENC28J60 chip. I am thinking can my micro-controller process the packets and measure the performance? ...

Performance comparison of AJAX requests: XML vs. JSON

I'm considering two different ways of completing the same task of displaying dynamic HTML using AJAX. The first method is to simply generate the HTML server-side and then insert it via. the DOM (jQuery's $().load() actually). The second method is to generate JSON server side and then use that data to inject elements into the DOM. I woul...

A multimap with good performance

In my code I have a map that is used heavily, several thousand times in a few seconds. Originally I had a TreeMap, but when testing with 9,000 entries I watched my old processor melt. And this needs to scale. So I moved to a HashMap and performance was excellent. Now I am changing my design and am looking for a MultiMap. However I'm afr...

Diagnosing pathological behavior of a piece of cluster software

I'm using a kind of load balancer over a small cluster that is able to achieve >2000rps on zero-duration requests (t.i. ones that are immediately satisfied by the worker nodes). But as soon as the requests stop being zero-duration and start taking even 1ms, performance immediately drops >10x. The data being transfered in both directions...

Performance cost of sending an email with PHP ?

Rich sites such as facebook send you an email for every event that takes place, notification, friend request and so on, I would like to know how costly is it for the web server to perform this action? that also 100s of time a day for active and popular users. Thanks ...

Objective C processor timer

Hi all, I would like to compare the real efficiency of different scripts. I currently use a timer : NSDate *start = [NSDate date]; // Do something NSLog(@"Elapsed : %f",[start timeIntervalSinceNow]); But it is not relevant since it might depend on the OS working in the background, etc... Does something that really measure the p...