performance

Is there a REAL performance difference between INT and VARCHAR primary keys?

Is there a measurable performance difference between using INT vs. VARCHAR as a primary key in MySQL? I'd like to use VARCHAR as the primary key for reference lists (think US States, Country Codes) and a coworker won't budge on the INT AUTO_INCREMENT as a primary key for all tables. My argument, as detailed here, is that the performanc...

Is Hibernate good for batch processing? What about memory usage?

I have a daily batch process that involves selecting out a large number of records and formatting up a file to send to an external system. I also need to mark these records as sent so they are not transmitted again tomorrow. In my naive JDBC way, I would prepare and execute a statement and then begin to loop through the recordset. As ...

separate table for picture items with image field

I store different items (notes, articles, pictures, files) in a single table (there are many metadata in common for all the item types - for example, categories, tags, rating, statistics etc.). My first design was like this: table Items, plus another "detail" table for each of the item types (NoteItems, ArticleItems, PictureItems etc.)....

JMX client that can persist gathered information

We've added performance measures to our application and are exposing them using JMX. Now we would like to gather and store performance data for analysis, in files or in a database. Does anyone know of a JMX client, open source or commercial, that can persist gathered information? ...

Is datareader quicker than dataset when populating a datatable?

Which would be quicker. 1) Looping a datareader and creating a custom rows and columns based populated datatable 2) Or creating a dataAdapter object and just (.Fill)ing a datatable. Does the performance of a datareader still hold true upon dynamic creation of a datatable? ...

Creating a new List

When creating a new list do you specify an initial size or leave it blank? I know by specifying an initial size you avoid having the list reallocate the underlying array every-time you add x number of items but you also add verbosity to your code. Is the minimal performance gain worth adding verbosity and complexity to your code. What ha...

Mass Insert Into Sql Server

I am attempting to insert a mass of records into SQL Server 2005 from Vb.Net. Although the insertion is working fine, I am doing my best to try to make it as fast as possible. Currently, it takes ~ 11 mins for 100,000 records. What would be the suggested approach to inserting a large number of records into SQL Server from an Applicati...

Is there an easy way to scale a 'views' or 'download' counter in a DB row?

Hey Everyone, I'm working on a little web project that needs to keeps to a NumViews counter for each object/row in a DB table. I'm concerning that all the updates to rows would start really degrade performance both the table grows in object count, and the site would grow in use. I'm using .NET 3.5 with MSSQL 2K5 if it matters. Any su...

What is the relative difference between in-proc, interprocess, and inter machine calls?

Ignoring payload size, what is relative difference in latency between an in-proc call (say in C++ or Java), a socket call to a process on the same machine, and a socket call to a process on another machine? This can be expressed as a minimum latency in ns/ms or in terms of relative orders of magnitude. I'm looking for something similar...

Using Linq with stored procedures

Hello, I want to plan a data access layer and I thought to use Linq. I read that linq has its problems with performance and that you could use stored procedures with linq. Should I use stored procedures with linq when planning my data access layer? Is it crucial for the performance? When should I use them? I know that stored procedures...

Does .NET assembly size affect performance?

Hi, Does the size of a .net assembly affect performance at all? How about the number of assemblies in your windows forms/web forms project? ...

Why are my programs running from my SD card so slow?

When moving my .Net Compact Framework application to the SD-card of a Windows CE device, the program executes slower then running it from the internal memory. I thought, the start-up might be slower, but it is the whole program. There is no IO to the storage card. Why is my application so slow and how does the compact framework handles...

When/how to optimize generic code?

When writing application code, it's generally accepted that premature micro-optimization is evil, and that profiling first is essential, and there is some debate about how much, if any, higher level optimization to do up front. However, I haven't seen any guidelines for when/how to optimize generic code that will be part of a library or...

Best way to stress test a website

This may be the wrong question to ask but, what's the best way to replicate a large load on an asp.net web application? Is there an easy way to simulate many requests on particular pages? Or is the best thing to use a profiler to track a single request and then work out from that if the performance is ok? It would be good to know how we...

Elisp performance on Windows and Linux

I have the following dead simple elisp functions; the first removes the fill breaks from the current paragraph, and the second loops through the current document applying the first to each paragraph in turn, in effect removing all single line-breaks from the document. It runs fast on my low-spec Puppy Linux box using emacs 22.3 (10 seco...

JDBC java drivers sql server 2005

We are upgrading our servers to SQL Server 2005 from SQL Server 2000. We currently use the jtds drivers. I'm interested to know what peoples opinions are of the different jdbc drivers available (in particular the latest Microsoft driver), how they perform with SQL Server 2005 and any other lessons from your collective experience. Thank...

What are your favorite features of a C/C++ performance profiler / analyzer?

I'm trying to pick a perforamnce analyzer to use. I'm a beginner developer and not sure what to look for in a performance analyzer. What are the most important features? ...

Java File I/O Performance Decreases Over Time

I'm trying to perform a once-through read of a large file (~4GB) using Java 5.0 x64 (on Windows XP). Initially the file read rate is very fast, but gradually the throughput slows down substantially, and my machine seems very unresponsive as time goes on. I've used ProcessExplorer to monitor the File I/O statistics, and it looks like th...

JSP Struts Performance/Memory Tips

I am working on a basic Struts based application that is experience major spikes in memory. We have a monitoring tool that will notice one request per user adding 3MB to the JVM heap memory. Are there any tips to encourage earlier garbage collection, free up memory or improve performance? The application is a basic Struts applicat...

How can I execute inefficient code only at compile time when using mod_perl?

I've been benchmarking the performance of a framework I'm writing in Perl and I'm getting a 50% decrease in requests per second over our existing codebase (some hit is understandable, because we're going from procedural spaghetti code to an OOP MVC framework). The application is running under mod_perl, and I've added Moose and all my fr...