performance

Should I use multiplication or division?

Here's a silly fun question: Let's say we have to perform a simple operation where we need half of the value of a variable. There are typically two ways of doing this: y = x / 2.0; // or... y = x * 0.5; Assuming we're using the standard operators provided with the language, which one has better performance? I'm guessing multiplicati...

Debugging Visual Studio 2008 Web Application takes long to launch

When debugging an asp.net web application in VS2008 IDE, i feel it takes 'long' to launch the application because it my app is not big (about six pages). I am not using the in-built VS web-server, I'm using the standard IIS web-server on my development machine. (That is, on the 'Start Options' dialog, I have set to 'Use custom server' a...

Can I get better performance using a JOIN or using EXISTS?

I have two tables Institutions and Results and I want to see if there are any results for institutions that way I can exclude the ones that don't have results. Can I get better performance using a JOIN or using EXISTS? Thank you, -Nimesh ...

Convert DataRowCollection to DataRow[]

What's the best performing way to convert a DataRowCollection instance to a DataRow[]? ...

why shrink a sqlserver 2005 database?

What are the advantages and disadvantages of shrinking a database? Are there any performance implications? ...

How to improve Netbeans performance

hello and good day for everyone This is my question. Exists a real way to get Netbeans load faster and working time too? It is to slow and when you have some time coding is worse it eat all my ram with no more.... bye bye ...

WCF in the enterprise, any pointers from your experience?

Looking to hear from people who are using WCF in an enterprise environment. What were the major hurdles with the roll out? Performance issues? Any and all tips appreciated! Please provide some general statistics and server configs if you can! ...

Loading flatfiles into a normalized MySQL database

What is the fastest way to load data from flatfiles into a MySQL database, and then create the relations between the tables via foreign keys? For example... I have a flat file in the format: [INDIVIDUAL] [POP] [MARKER] [GENOTYPE] "INDIVIDUAL1", "CEU", "rs55555","AA" "INDIVIDUAL1", "CEU", "rs535454","GA" "INDIVIDUAL1", "CEU",...

what is the fastest way to generate a unique set in .net 2

I have what is essentially a jagged array of name value pairs - i need to generate a set of unique name values from this. the jagged array is approx 86,000 x 11 values. It does not matter to me what way I have to store a name value pair (a single string "name=value" or a specialised class for example KeyValuePair). Additional Info: There...

Should I always make my java-code thread-safe, or for performance-reasons do it only when needed?

If I create classes, that are used at the moment only in a single thread, should I make them thread-safe, even if I don't need that at the moment? It could be happen, that I later use this class in multiple threads, and at that time I could get race conditions and may have a hard time to find them if I didn't made the class thread-safe i...

What is the best way to compare .NET performance vs. VB 6 performance at a customer site?

Two questions: Can someone point me to unbiased data that compares .NET performance to VB 6 performance? I have searched but it is surprisingly difficult to find. What is the best way to compare .NET performance to VB 6 performance as an app behaves at a customer's site? We have a WindowsForms, client-server app (written for 2.0, upg...

Are there better clients for viewing System Monitor logs?

Does anyone know of a better GUI client for displaying Windows System Monitor log files? (System Monitor is sometimes called Performance Monitor.) I'm trying to track a long-term memory leak in a C# application running on Windows XP or 2K3 by comparing memory usages to run logs. Specifically I want a client that will allow me to see the...

Looking for pattern/approach/suggestions for handling long-running operation tied to web app

Hello, I'm working on a consumer web app that needs to do a long running background process that is tied to each customer request. By long running, I mean anywhere between 1 and 3 minutes. Here is an example flow. The object/widget doesn't really matter. Customer comes to the site and specifies object/widget they are looking for. We s...

How do you determine the ideal buffer size when using FileInputStream?

I have a method that creates a MessageDigest (a hash) from a file, and I need to do this to a lot of files (>= 100,000). How big should I make the buffer used to read from the files to maximize performance? Most everyone is familiar with the basic code (which I'll repeat here just in case): MessageDigest md = MessageDigest.getInstance(...

C++ performance of accessing member variables versus local variables

Is it more efficient for a class to access member variables or local variables? For example, suppose you have a (callback) method whose sole responsibility is to receive data, perform calculations on it, then pass it off to other classes. Performance-wise, would it make more sense to have a list of member variables that the method popula...

Measure Thread Expenses

Joe Duffy states in the MSDN article "Using concurrency for scalability" that the cost of creating a thread is approximately 200,000 cycles, and the cost of destroying is about 100,000 cycles. When I try to create a new thread to perform some calculations, I would like to be sure that the calculations themselves are more expensive than ...

When should I use primitives instead of wrapping objects?

Actually here is a similar topic with little practical value. As far as I understand, primitives perform better and should be used everywhere except for the cases where Object-related features (e.g. null check) are needed. Right? ...

How do you measure page load speed?

I am trying to quantify "site slowness". In the olden days you just made sure that your HTML was lightweight, images optimized and servers not overloaded. In high end sites built on top of modern content management systems there are a lot more variables: third party advertising, trackers and various other callouts, the performance of CDN...

C# .NET: How to check if we're running on battery?

i want to be a good developer citizen, pay my taxes, and disable things if we're running over Remote Desktop, or running on battery. If we're running over remote desktop (or equivalently in a Terminal server session), we must disable animations and double-buffering. You can check this with: /// <summary> /// Indicates if we're running ...

What's a good way to profile the connection speed of Web users?

I have a client whose desired Web UI is graphically intense; we would like to gather statistics on the average bandwidth of those connecting to the site. Is there an easy way to do that? The "simplest thing that could possibly work" would seem to be a Flash or Silverlight component that times the download of a file of some size (say 200K...