performance

A subquery that should be independent is not. Why?

I have a table files with files and a table reades with read accesses to these files. In the table reades there is a column file_id where refers to the respective column in files. Now I would like to list all files which have not been accessed and tried this: SELECT * FROM files WHERE file_id NOT IN (SELECT file_id FROM reades) This ...

How to evaluate the performance of web servers?

I'm planing to deploy a django powered site. But I feel confused about the choice of web servers, which includes apache, lighttpd, nginx and others. I've read some articles about the performance of each of these choice. But it seems no one agrees. So I'm wondering why not test the performance by myself? I can't find information about ...

Is it good to store long strings in a database?

I need to store long strings in a database. the string may be 5 or 6 sentences long. do you think this is a good design strategy. or should I store an id for that string and then create a relationship with another table that contains the location of the file storing the string. could you please give advantages and disadvantages of both. ...

Optimizing performance of an ASP.NET website

We are currently trying to optimize the performance of an ASP.NET based website which has been in development for quite a long time. We are using MS Ajax with UpdatePanels and such. ComponentArt is also part of the picture. The page load method is very heavy and we are trying to trim some fat from here. Is there any way we can avoid cal...

xml schema collection change - huge performance hit

I'm seeing a huge performance hit in our enterprise application when changing the XML schema collection of a given column on a large table. Simplistically put, we're doing something like this: ALTER TABLE HugeTable ALTER COLUMN CustomFields XML (note: CustomFields was previously bound to XML(CustomFieldsSchemaCollection, but of course...

500 error when trying to add expires header to .htaccess

I'm trying to add a far future expires header by editing my .htaccess file this is recommended in the yslow performance rules but when I do, I get a 500 internal server error here's the code I'm using, any body know what's up? ExpiresActive On ExpiresDefault A0 ExpiresByType image/gif A2592000 ExpiresByType image/png A2592000 Expires...

Will Ruby ever be *fast* ?

Will Ruby ever see a performance boost as Javascript has seen recently? Can a new VM make it really, really, fast? Or do we have to assume all the benefits of Ruby have an inescapable performance penalty? What methods could be taken to improve its performance compared to other faster languages? ...

Profiling bandwidth and speed of different WCF bindings

I'm interested in knowing the different bandwidth and performance characteristics of the different WCF bindings (basicHttp, WSHttp, nettcp, etc.). Aside from writing a service and exposing the different endpoint bindings that we can call to exercise, how could I measure these metrics? In particular, I need to know how bandwidth and per...

Is it faster to give Perl's print a list or a concatenated string?

option A: print $fh $hr->{'something'}, "|", $hr->{'somethingelse'}, "\n"; option B: print $fh $hr->{'something'} . "|" . $hr->{'somethingelse'} . "\n"; ...

What is faster, flat files or a MySQL RAM database?

I need a simple way for multiple running PHP scripts to share data. Should I create a MySQL DB with a RAM storage engine, and share data via that (can multiple scripts connect to the same DB simultaneously?) Or would flat files with one piece of data per line be better? ...

scaling up using memcached to store gzipped file

I have a web service that serves a javascript source file to browsers. The javascript file is compiled by php in real time with some file includes. The resulting file changes only a few times a day. It is gzipped by apache before being served to browsers. I'd like to use memcached to serve it from memory to avoid disk and cpu loads of f...

ASP.NET application on IIS7 - very slow startup after iisreset

I have an ASP.NET 3.5 website running under IIS7 on Windows 2008. When I restart IIS (iisreset), then hit a page, the initial startup is really slow. I see the following activity in Process Explorer: w3wp.exe spawns, but shows 0% CPU activity for about 60 seconds Finally, w3wp.exe goes to 50% CPU for about 5 seconds and then the pag...

Why is this code so slow?

So I have this function used to calculate statistics (min/max/std/mean). Now the thing is this runs generally on a 10,000 by 15,000 matrix. The matrix is stored as a vector<vector<int> > inside the class. Now creating and populating said matrix goes very fast, but when it comes down to the statistics part it becomes so incredibly slow. ...

Can creating a C++ control and using it in C# gain performance?

In reality, I am trying to create a control showing price depths of a stock which needs to accept a large number of messages and summarizing them for display purposes. Will I get a better result if I create it in MFC and use that control in my .Net Winform application than writing the whole thing in .NET? ...

Multicast Send Performance

We recently completed an analysis of multicast sending performance. Happily, Java and C performed almost identically as we tested different traffic sending rates on Windows and Solaris. However, we noticed that the time to send a multicast message increases as the time between sends increases. The more frequently we call send, the le...

How does Swing handle consecutive changes to the same component?

I'm a little confused about the Swing painting model. Suppose that I have a JComponent comp, and I do something like: c.setBackground(Color.RED); c.setBackground(Color.YELLOW); Obviously, the end result is that the color is yellow. How does Swing handle this? Does the first call trigger an immediate repaint so there'll be a short f...

How to track number of views in the most efficient way?

I've this blog-like system (LAMP) and I'd like to track number of views of every article. Now, is it better to update the article's views column every time the article is viewed or use some temp table, where I'd store only the article ID, and then (let's say every hour) run a query that would take the data from the temp table and update ...

SQLServer vs StateServer for ASP.NET Session State Performance

I'm studying for a MS certification and one of the practice tests I'm doing has a question where the point of contention is the performance between storing the session in SQL Server as opposed to StateServer. Given the app is running in a web farm, which solution for session state gives the best performance (SQL Server or StateServer) a...

Representing a 2D array as a 1D array

Possible Duplicates: Implementing a matrix, which is more efficient - using an Array of Arrays (2D) or a 1D array? Performance of 2-dimensional array vs 1-dimensional array I was looking at one of my buddy's molecular dynamics code bases the other day and he had represented some 2D data as a 1D array. So rather than having to...

Non-linear scaling of .NET operations on multi-core machine

I've encountered a strange behavior in a .NET application that performs some highly parallel processing on a set of in-memory data. When run on a multi-core processor (IntelCore2 Quad Q6600 2.4GHz) it exhibits non-linear scaling as multiple threads are kicked off to process the data. When run as a non-multithreaded loop on a single cor...