performance

What's the fastest way to decompress JPEG images in C#

I need to write an app to playback a DICOM multiframe image. Each frame is stored in JPEG format. All the frames are stored consecutively in one file. Right now, I read out each frame data and pass it to the following routine to construct a Bitmap for display: Bitmap CreateBitmap(byte[] pixelBuffer, int frameSize) { B...

Fastest method to fill a database table with 10 Million rows

What is the fastest method to fill a database table with 10 Million rows? I'm asking about the technique but also about any specific database engine that would allow for a way to do this as fast as possible. I"m not requiring this data to be indexed during this initial data-table population. ...

Monitoring dashboard for IIS and SQL Server

We have developed a .NET web application that uses SQL Server as a backend. Now we would like to provide a monitoring dashboard app for the tech support team. The idea is that this monitoring app will show a global picture of the "health" of the web servers hosting the application and the database servers holding the data. This "health" ...

Under what circumstances does Groovy use AbstractConcurrentMap?

(Specifically, org.codehaus.groovy.util.AbstractConcurrentMap) While doing some profiling of our application thats mixed Java/Groovy, I'm seeing a lot of references to the AbstractConcurrentMap class, none of which are explicit in the code base. Does groovy use this class when maps are instantiated in the groovy dynamic def myMap = [:]...

How to use JpegBitmapDecoder in Systems.Windows.Forms.UserControl

Is there a way that I can use the BitmapFrame returned from JpegBitmapDecoder in the UserControl.OnPaint() method? I was told that the performance of JPEG decoding from Systems.Windows.Media.Imaging is much better than the one in GDI+ used by Systems.Windows.Forms library. However, my application is written with Systems.Windows.Forms l...

Jamon statistics aggregation across multiple JVMs

Hello, I have a tomcat server running a webapp. Apart from this there are two other JVMs that run batch processing tasks. Jamon is a really cool way to monitor performance, hits etc., and can be viewed on the web using Jamonadmin.jsp (supplied with jamon war file). But I want to aggregate the Jamon statistics from the other two JVMs and...

Initialising arrays in C++

Everywhere I look there are people who argue vociferously that uninitialised variables are bad and I certainly agree and understand why - however; my question is, are there occasions when you would not want to do this? For example, take the code: char arrBuffer[1024] = { '\0' }; Does NULLing the entire array create a performance impa...

WMI Poor Performace

Hi I wrote a code in C# that maps logical drives to their physical disks, using WMI (System.Management). The code working perfectly, but slow like hell. In my machine (Windows 7 x64, Dual-Core with 3 GB RAM) it runs as least 1 second. 1 second is too slow for me, even 0.1 is more than enough to accomplish. I more than sore that this fun...

Are multiple UIView animation callbacks a bad idea (i.e. cause mem issues)?

I have multiple UIView animations running in my app. They are very short, and then make callbacks to a method that then usually fires off another animation. This leads to a lot of little animations running at the same time, each firing back callbacks. This actually performs pretty well, and for the first few levels (the app is a game)...

Most important speed issues

I am participating in Al Zimmermann's Programming Contest. http://www.azspcs.net/Contest/SonOfDarts I have written a recursive algorithm but it takes a long time to run. I was wondering what are the most important things to consider about speed of recursive algorithms. I have made most of the properties global so they don't get all...

SQL Server - bulk delete (truncate vs delete)

Hello folks, We have a table with a 150+million records. We need to clear/delete all rows. Delete operation would take forever due to it writing to the t-logs and we cannot change our recovery model for the whole DB. We have tested the truncate table option. What we realized that truncate deallocates pages from the table, and if I am...

execut jar file many times and analyse output

Hi, I'd like to test which of two implementation in java of a problem is the fastest. I've 2 jar files with the two implementation I can execute from the terminal. I want to execute both about 100 times and analyse which one is the fastest to do that or that task. In the output one of the line is "executing time : xx", I need to catch t...

Is there a big performance hit with using file_store for storing the cache as opposed to mem_cache_store?

I don't think I'm at the point where I need to go through and get memcached setup for my Rails app, but I would like to do some simple caching on a few things. Is using file_store for as the config.cache_store setting sufficient enough? Or will having to access files for data over and over kill the benefit of caching in the first place ...

Performance: Which of these examples of code is faster and why?

$('#element').method(); or var element = $('#element'); element.method(); ...

will there be any performance issue - if i use cpp inside c# ?

Hi all, i do have a cpp program which does text processing on 40k records. we developed this program in cpp because we thought it would be faster. then i used/executed this cpp part inside my c# program using the process-execute but the problem is we feel like we lost control of the execution flow.. cant able to log-in the ha...

Performance improvements for the Open GL ES code in the CrashLanding sample code?

I'm making an iPhone game based on the CrashLanding sample code. The sample code includes some Open GL ES stuff (Texture2D and MyEAGLView). What are some ways to improve the performance of this code? I'm fine w/ making certain trade-offs to improve the performance... but I don't what these trade-offs might be. For example perhaps o...

Is there a faster way to compare two variables?

I have this piece of code where Shark tells me it's a performance bottleneck: CGFloat shortestDistance = (distanceA < distanceB) ? distanceA : distanceB; all these values are CGFloat. Is there a faster way to figure out which one is smaller and assign that to shortestDistance? Maybe even by reference instead of copying a value? How wo...

Tools, tips, and tricks for monitoring multithreaded .NET applications

I'm embarking on a C# project where certain tasks will be divvied up and run on multiple threads. I'm looking for as many good tools as possible to help make sure I'm running as efficiently as possible. So I want to watch for things like resource (CPU) usage, blocking, deadlocks, threads that are waiting for work, and so on. I want to...

Win32 API FindFirstFile and FindNextFile performance vs command line

We have encountered an unexpected performance issue when traversing directories looking for files using a wildcard pattern. We have 180 folders each containing 10,000 files. A command line search using dir <pattern> /s completes almost instantly (<0.25 second). However, from our application the same search takes between 3-4 seconds. We...

measure page rendering time on IE 6 or FF 3.x

I have a page constructed using Dojo and I need to measure how long the page takes to complete rendering on my browser (NOT time-to-first-byte, or time-to-last-byte). In other words, the page (all bytes) might get downloaded to my broswer but the components I'm using (eg. calendar, grid etc) might still initialize and render long after ...