performance

Is there a caching script for classic asp?

PHP has a number of opcode caches, which as i understand it are scripts that handle the caching aspects of an application. Is there something similar for classic asp, especially something that does not require component installation? Regarding the IIS caching behaviour, it seems from reading here that the behaviour is relevant to some s...

Slow SoapHttpClientProtocol constructor

I'm doing some experiments with Microsoft Dynamics CRM. You interact with it through web services and I have added a Web Reference my project. The web service interface is very rich, and the generated "Reference.cs" is some 90k loc. I'm using the web reference in a console application. I often change something, recompile and run. Compi...

Indexing URL's in SQL Server 2005

What is the best way to deal with storing and indexing URL's in SQL Server 2005? I have a WebPage table that stores metadata and content about Web Pages. I also have many other tables related to the WebPage table. They all use URL as a key. The problem is URL's can be very large, and using them as a key makes the indexes larger and s...

Speeding Up Python

This is really two questions, but they are so similar, and to keep it simple, I figured I'd just roll them together: Firstly: Given an established python project, what are some decent ways to speed it up beyond just plain in-code optimization? Secondly: When writing a program from scratch in python, what are some good ways to greatly ...

When and why are database joins expensive?

I'm doing some research into databases and I'm looking at some limitations of relational DBs. I'm getting that joins of large tables is very expensive, but I'm not completely sure why. What does the DBMS need to do to execute a join operation, where is the bottleneck? How can denormalization help to overcome this expense? How do other ...

Apache uses excessive CPU

We run a medium-size site that gets a few hundred thousand pageviews a day. Up until last weekend we ran with a load usually below 0.2 on a virtual machine. The OS is Ubuntu. When deploying the latest version of our application, we also did an apt-get dist-upgrade before deploying. After we had deployed we noticed that the load on the C...

Is .NET memory management faster in managed code than in native code?

I would have thought that it would be clear cut whether memory allocation is faster in managed code than in native code - but there seems to be some controversy. Perhaps memory management under a Virtual Machine be faster because of no context-swapping calls to the OS, but then I see that the VM would itself need to make periodic calls ...

Performance issue with "new ReportDocument()"

I have a C# application where I create a Crystal Reports ReportDocument, with the line CrystalDecisions.CrystalReports.Engine.ReportDocument document = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); This line takes 3-4 seconds to execute. This seems very slow, especially since the document.Load(fi...

Is anyone running a production ASP.NET site on top of Mono?

I'm trying to do an informal feasibility study for work on if Mono/Apache/Linux is realistically 'ready' and in any way comparable to a more traditional .NET/IIS/Windows stack. Any comparison of performance would be helpful too. ...

.toArray(new MyClass[0]) or .toArray(new MyClass[myList.size()]) ?

Assuming I have an ArrayList ArrayList<MyClass> myList; And I want to call toArray, is there a performance reason to use MyClass[] arr = myList.toArray(new MyClass[myList.size()]); over MyClass[] arr = myList.toArray(new MyClass[0]); ? I prefer the second style, since it's less verbose, and I assumed that the compiler will make...

PHP HTML generation - using string concatention

A question about different methods of outputting html from PHP; what are the performance differences between these: Method 1 - variable concatenation $html = ''; $html .= '<ul>'; for ($k = 1; $k < = 1000; $k++){ $html .= '<li> This is list item #'.$k.'</li>'; } $html .= '</ul>'; echo $html; Method 2 - output buffering ob_start()...

Is it worthwhile to use a bit vector/array rather than a simple array of bools?

When I want an array of flags it has typically pained me to use an entire byte (or word) to store each one, as would be the result if I made an array of bools or some other numeric type that could be set to 0 or 1. But now I wonder whether using a structure that is more space-efficient is worth it given the (albeit hopefully very slight)...

How can I speed up my Perl program?

This is really two questions, but they are so similar, and to keep it simple, I figured I'd just roll them together: Firstly: Given an established Perl project, what are some decent ways to speed it up beyond just plain in-code optimization? Secondly: When writing a program from scratch in Perl, what are some good ways to greatly impr...

SQL Server 2005 - Rowsize effect on query performance?

Im trying to squeeze some extra performance from searching through a table with many rows. My current reasoning is that if I can throw away some of the seldom used member from the searched table thereby reducing rowsize the amount of pagesplits and hence IO should drop giving a benefit when data start to spill from memory. Any good res...

In PHP (>= 5.0), is passing by reference faster?

In PHP, function parameters can be passed by reference by prepending an ampersand to the parameter in the function declaration, like so: function foo(&$bar) { // ... } Now, I am aware that this is not designed to improve performance, but to allow functions to change variables that are normally out of their scope. Instead, PHP see...

How fast is a log4net logging method (Debug, Info, etc)?

I'm a big fan of log4net, but recently, some (in my department) have questioned its inclusion in our projects because of the seemingly heaviness of each logging method. I would argue that there are better techniques than others, but that's another question. I'm curious to know, what is the typical impact of a log4net DebugFormat-type ca...

Reloading configuration without restarting application using ConfigurationManager.RefreshSection

Has anyone got this working in a web application? No matter what I do it seems that my appSettings section (redirected from web.config using appSettings file=".\Site\site.config") does not get reloaded. Am I doomed to the case of having to just restart the application? I was hoping this method would lead me to a more performant solut...

Speeding Up Java

This is really two questions, but they are so similar, and to keep it simple, I figured I'd just roll them together: Firstly: Given an established Java project, what are some decent ways to speed it up beyond just plain in-code optimization? Secondly: When writing a program from scratch in Java, what are some good ways to greatly impr...

DataReader or DataSet when pulling multiple recordsets in ASP.NET

I've got an ASP.NET page that has a bunch of controls that need to be populated (e.g. dropdown lists). I'd like to make a single trip to the db and bring back multiple recordsets instead of making a round-trip for each control. I could bring back multiple tables in a DataSet, or I could bring back a DataReader and use '.NextResult' to ...

Quick and dirty way to compare SQL server performance

Further to my previous question about the Optimal RAID setup for SQL server, could anyone suggest a quick and dirty way of benchmarking the database performance on the new and old servers to compare them? Obviously, the proper way would be to monitor our actual usage and set up all sorts of performance counters and capture the queries, e...