performance

Difference between serving single resource to many vs. many resources to many?

What's the performance difference between a web server serving the same file to 10 people vs. 10 different files to 10 different people? ...

How would you optimise/simulate 'random' loading of large image files?

We use large background images (hi-res photos, up to 700 KB) for our page design. It's part of the experience of the site that as you browse around, you see different images. At the moment a different (random) image is loaded on each page request, from a pool of ~15 images, which could grow over time. I'm looking for a sane way to opti...

Measure performance bottlenecks in a library

In my website I have a rather complicated business logic part encapsulated in a single DLL. Because CPU usage hits the roof when I call certain methods of it I need to measure and optimize. I know about the performance profiler, but I don't know how to set it up for a library. Furthermore I don't seem to find any usefull resources about ...

Is it worth remaking an e-commerce website to use mySQL instead of Access?

I am doing some work on an asp website that uses Access as its database. Recently, the site has been having unexplained downtime, and we are wondering if making a whole new site, and switching to PHP with mySQL would bring a big performance boost or not. It is a fairly busy site with about max 80 people connected at once. ...

Excel/VBA to check if a row exists

I have a sheet full of some raw data, about 20,000 rows and 50 columns. (Number of rows expected to increase, probably double if not triple) I need a formula to look at this data and determine if a row exists for data in two specified columns. My current formula is as follows. Function CheckExists(Table As Range, SearchCol1 As Integer,...

ASP.NET Membership Provider, User ID GUID, and disk space

I'm currently using the SQL Membership provider for ASP.NET, which uses GUIDs for the User ID. My application has several custom tables that have foreign key relations back to the User table and I'm concerned about the disk space and performance implications of the standard provider's use of GUIDs for user ID. Has anyone run into space...

Find out how much time a process is blocked waiting for I/O on Linux

Is there a vmstat type command that works per-process that allows you to see how much time a process is blocked waiting for I/O, time in kernel and user code? ...

Optimized implementations of java.util.Map and java.util.Set?

I am writing an application where memory, and to a lesser extent speed, are vital. I have found from profiling that I spend a great deal of time in Map and Set operations. While I look at ways to call these methods less, I am wondering whether anyone out there has written, or come across, implementations that significantly improve on acc...

How do different browsers handle caching for static content without an Expires Header?

After running the YSlow plugin on a site, I saw that one of the recommendations was to add far future expires headers to the scripts, stylesheets, and images. I asked a different question about how to set this up in IIS, but I am actually just curious about how each browser behaves. I have read that IE will cache items per browsing s...

Is BIT field faster than int field in SQL Server?

I have table with some fields that the value will be 1 0. This tables will be extremely large overtime. Is it good to use bit datatype or its better to use different type for performance? Ofcource all fields should be indexed. ...

SET vs. SELECT - What's the difference?

Can someone please identify the functional/performance differences, if any, between SET and SELECT in T-SQL? Under what conditions should I choose one over the other? UPDATE: Thanks to all who responded. As a few people pointed out, this article by Narayana Vyas Kondreddi has lots of good info. I also perused the net after reading the...

Is there any time trace web application?

Is there any time trace web application? I want use it as a tool for monitor my program productivity.(I mean, how many hours I spend on a project) edit: I once notice there is one (like a web twitter with time trace), but I forgot its name. ...

Unite two MySQL queries with a UNION or programmatically

I've got two MySQL queries that both insert data into a table. Both have the following format: CREATE TABLE IF NOT EXISTS `data` ( `id` BIGINT NOT NULL AUTO_INCREMENT UNIQUE, PRIMARY KEY (`id`) ) SELECT `field1`, `field2` WHERE `active` = 1 The only differences between the two queries are how field1 and field2 are determined, and some...

How to speed up marching cubes?

I'm using this marching cube algorithm to draw 3D isosurfaces (ported into C#, outputting MeshGeomtry3Ds, but otherwise the same). The resulting surfaces look great, but are taking a long time to calculate. Are there any ways to speed up marching cubes? The most obvious one is to simply reduce the spatial sampling rate, but this reduces...

Why is looping over range() in Python faster than using a while loop?

The other day I was doing some Python benchmarking and I came across something interesting. Below are two loops that do more or less the same thing. Loop 1 takes about twice as long as loop 2 to execute. Loop 1: int i = 0 while i < 100000000: i += 1 Loop 2: for n in range(0,100000000): pass Why is the first loop so much slow...

Workflow Designer Unusably Slow. Is it the Xoml?

I've got a WF State Machine which I use to handle page navigation on a WPF Media Center App. It's got a half-dozen states which each have Initialization handlers and one or two EventDriven handlers. When you first make a StateMachine workflow using a VS template, you have the option of using a code-behind model, or a code-separate model...

Performance concerns of instantiating a class multiple times

I'm wondering the performance differences between instantiating a class once in a form or whenever it is needed. For example, say I have a customer form to edit a customer. On the form load, I instantiate a customer class and call a function to return the customer data to populate the form controls. CustomerInfo customer = new Custome...

How would I go about making an efficient key value store (e.g. memcache) / simple database?

For a few projects I'm working on I need a persistent key value store (something akin to memcache). It would ideally run as a server; it needs to be really efficient. I'm aware that memcachedb exists, but I'd like to have a go at writing it myself as there's going to be a lot of custom functionality that I'll need to include later on. I'...

Is this PHP class optimized for mysql database access?

I've wrote a quick PHP class to ease the access to a mysql database. The class works ok, and has a query() method that opens up the connection, executes the query and then closes the connection (I know that the connection is supposed to close by PHP itself after the script finishes, but I don't like to rely very much on that). From a pe...

Java synchronization and performance in an aspect

I just realized that I need to synchronize a significant amount of data collection code in an aspect but performance is a real concern. If performance degrades too much my tool will be thrown out. I will be writing ints and longs individually and to various arrays, ArrayLists and Maps. There will be multiple threads of an application tha...