performance

How to delete faster?

I have a DB table which consists of 2.5 billion records. There are duplicates to the tune of 11 million. Which is the fastest way to delete these 11 million records? ...

Strange performance increase in projects compiled in VS 2008 comparing with VS2005

I have a 3rd party library and a simple benchmark test that I write by myself to test this library for performance. 3rd party library is C++/CLI .NET library and most code there is unmanaged. This library is assembled for .NET Framework 2.0. My benchmark test is managed C# code that adds little overhead to the library, only simple calls ...

ASP.net Performance and Compile Queries

I have an ASP.net site that is essentially just a user interface for a class library I created. Each of the classes in this class library contain a static definition class with static references to compiled queries. Like so: class MyRecord { /*Some Properties,Fields, and Methods*/ internal static class Queries { ...

Are solid-state drives good enough to stop worrying about disk IO bottlenecks?

I've got a proof-of-concept program which is doing some interprocess communication simply by writing and reading from the HD. Yes, I know this is really slow; but it was the easiest way to get things up and running. I had always planned on coming back and swapping out that part of the code with a mechanism that does all the IPC(interpr...

What is the minimun Cross AppDomain communication performance penalty?

Hello, I am trying to minimize the performance penalty of communicating across AppDomains in the same machine. In my toy example, Class A is loaded in AppDomain 1. It creates an AppDomain 2 and loads there an instance of Class 2 (Class 2 inherits from MarshalByRef) getting back a proxy. Then Class 1 calls repeatedly a method on the prox...

Java BigInteger, cut off last digit

Fairly easy, if the BigInteger number is 543 I want it to cut off the last digit so that it is 54. Two easy ways to do this can be : Use strings, get substring and create new biginteger with the new value. Use BigIntegers divide method with number 10. ( 543 / 10 = 54.3 => 54 ) The thing is I will be performing this a lot of times wi...

Free or inexpensive options for profiling / performance analysis for C# asp.net?

Title pretty much says it all. I know about Redgate's Ants Profiler which I hear is awesome but it's also $400. Any cheaper alternatives out there that will at least point me to where I might need to optimize my code? ...

Fastest way to find minimal Hamming distance to any substring?

Given a long string L and a shorter string S (the constraint is that L.length must be >= S.length), I want to find the minimum Hamming distance between S and any substring of L with length equal to S.length. Let's call the function for this minHamming(). For example, minHamming(ABCDEFGHIJ, CDEFGG) == 1. minHamming(ABCDEFGHIJ, BCDGHI...

Resource (JS, CSS) compression, minification, and versioning in ASP.NET.

We’re coming to a big release in a web project I work on, and I’m starting to think more and more about javascript/css performance and versioning. I’ve got a couple high level ideas so far: Write (or customize) an http handler to do this for me. This would obviously have to handle caching as well to justify the on the fly IO that wou...

Best practises to stop memory leaks and improve performance

To put it simply i am a fairly new PHP coder and i was wondering if anyone could guide me towards the best ways to improve performance in code as well as stopping those pesky memory leaks, my host is one of those that doesn't have APC or the like installed so it would all have to be hand coded -_- ...

C# List<T>.ToArray performance is bad?

Hello everyone, I am using VSTS 2008 + .Net 3.5 + C#. I heard the performance of C# List.ToArray is bad since what it does is memory copy for all elements to form a new array. Is that true? thanks in advance, George ...

Fastest way to retrieve/store millions of small binary objects

Hi everyone, I am looking for a fast (as in huge performance, not quick fix) solution for persisting and retrieving tens of millions of small (around 1k) binary objects. Each object should have a unique ID for retrieval (preferably, a GUID or SHA). Additional requirements is that it should be usable from .NET and it shouldn't require ad...

LinqToSQL DateTime filters?

I've got a linqtosql query filtering and ordering by a datecolumn that takes 20 seconds to run. When I run the generated sqlquery directly on the DB it returns in 0 seconds. var myObjs = DB.Table .Where(obj => obj.DateCreated>=DateTime.Today) .OrderByDescending(obj => obj.DateCreated); The table has only 100,000 records and the DateT...

Best Practise for Stopwatch in multi processors machine?

I found a good question for measuring function performance, and the answers recommend to use Stopwatch as follows Stopwatch sw = new Stopwatch(); sw.Start(); //DoWork sw.Stop(); //take sw.Elapsed But is this valid if you are running under multi processors machine? the thread can be switched to another processor, can it? Also the same ...

drawing Graphics performance issue

i am trying to create slider movement graphics. The code explain better this. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Drawing.Drawing2D; namespace temp { public partial class Form1 : Form { ...

How is the current performance of the Mono virtual machine?

The web is full of different kinds of performance test of different languages, compilers, and virtual machines. Yet hardly any of these test the performance using some real-world scenario. In addition, searching Google for these kind of benchmarks usually yields mainly only several years-old benchmarks as those have had the most time to ...

How to draw line of ten thousands of points with WPF within 0.5 second?

I am writing WPF code to show a real-time plot which is a connected line containing about 10,000 points. It takes about 5 seconds to show a picture in my computer. Does anyone have an idea to make it quicker and within 0.5 second? class eee : FrameworkElement { public eee() { _children = new VisualCollection(this); ...

Mysql store procedure performance

Hi How is store procedure's performance? Is it worth using them or implement a complex query in PHP-MySQL call? Regards ...

Exception handeling performance

Hi While using try-catch blocks, even if any exceptions are not thrown, does it consider performance of the code? I wanted to code my own Exception handler which extends from standard exception class, was wondering if this situation downs the performance of the page on several calls. Regards ...

ActiveDirectory query performance for not including

I'm curious as to whether the following will negatively impact performance in a significant way... I have a web form with an input box and grid (could be any form of application really) and allows the user to search Active Directory for users...I don't want user accounts that have the $ as part of there sAMAccountName and so am wonderin...