performance

Does coding towards an interface rather then an implementation imply a performance hit?

In day to day programs I wouldn't even bother thinking about the possible performance hit for coding against interfaces rather than implementations. The advantages largely outweigh the cost. So please no generic advice on good OOP. Nevertheless in this post, the designer of the XNA (game) platform gives as his main argument to not hav...

Should I bother about lazy loading in a web application?

I've learned that to have a singleton lazy loading, this is the pattern to use: private MyObject() { } public static MyObject Instance { get { return SingletonCreator.CreatorInstance; } } private static class SingletonCreator { private static readonly MyObject _instance = new MyObject(); public static MyObject CreatorInst...

Which method of checking to see if a NSDictionary contains a particular key is faster?

I can test for the presence of a key in an NSDictionary in two ways: BOOL containsKey = [[dictionary allKeys] containsObject:foo]; BOOL containsKey = ([dictionary objectForKey:foo] != nil); which method is faster? Please show your work. ...

glibc and SSE functionality

I am trying to find information on glibc and to what extent it uses SSE functionality. If it is optimized, can I use it out-of-the-box? Say I am using one of the larger Linux distros, I assume that its glibc is compiled to be as generic as possible and to be as portable as possible, hence not optimized? I am particular interested in ...

MySQL named pipes on Windows--faster best practice, or bad idea?

Lately I've been favoring using named pipes (option --enable-named-pipes) in MySQL running on windows, and connect via the .NET connector driver. It's often recommended for security purposes, but one thing it allows me to do is connect with "." as the connection string and develop on my PC and deploy to the server without having to chan...

[MVC] Best way to save logs/statistics

I use Catalyst (MVC framework for Perl), but the question probably apply to all MVC framework. Until now, I used the Apache log files to get statistics about the visitors: user agent, URL accessed, time, etc. But now that I moved to an MVC framework, I don't think this is adequate. If a request to /1/foo and /1/bar are the same for me, ...

Preventing a heavy process from sinking in the swap file

Our service tends to fall asleep during the nights on our client's server, and then have a hard time waking up. What seems to happen is that the process heap, which is sometimes several hundreds of MB, is moved to the swap file. This happens at night, when our service is not used, and others are scheduled to run (DB backups, AV scans etc...

Subsonic Performance, can it handle up to 1million song information?

I did notice the statement on Subsonics page that it can handle 100000+ files, but we would need to handle information for up to 1 million songs. Do we know what the 100000 limitation is from -- is it based on database speed, hard drive capacity, or is that simply all that it has been tested with? Could you share some proven examples ab...

Can I compile java myself ?

Is they say that sun's java is opensource now - then can I compile all the patform from sources ? I used gentoo and I found a great performance inmrovement wnen I compiled the system myself, so can it be done with java (both vm runtime and library classes ) ? Is it possible to do under windows/linux ? Did anyone do it ? Does it make ...

How fast should a dynamically generated web page be created?

I have a number data-driven web based applications that serve both internal and public users and would like to gauge how fast you would expect a page to be created (in milliseconds) in order to maintain user satisfaction and scalability. So, how fast does a page have be created to maintain a fast site? The sites are developed in ASP cl...

ASP.NET: Request.Form is slow!

I have a very strange behavior with Request.Form. Here are two IIS 7 servers running the same ASP.NET application. On the first instance it's all ok. But the second one have very slow performance. Profiler showed that this line: context.Request.Form["id"] takes more than 130 ms each time! Profiler log: 0,60% get_Form - 4536 ms - 6...

Effecient network server design examples, written in C

I am interested in learning how to write extremely efficient network server software and I don't mind getting my hands dirty with pointers, sockets and threading. I'm talking a server being able to handle thousands of concurrent connections. There is not much processing for each client, but a little. Do you know of any code examples for...

Only run thread when I/O load is low

I have a background thread that performs I/O operations (keeping an index up to date). But in addition to that several clients access the server's hard disk and I want these accesses as fast as possible. So I thought, it would be nice, if the indexing thread is only running when the I/O load is low. Is there a way to figure this out? I...

Winforms: SuspendLayout/ResumeLayout is not enough?

Hi, I have a library of a few "custom controls". Essentially we have our own buttons, rounder corner panels, and a few groupboxes with some custom paint. Despite the "math" in the OnPaint methods, the controls are pretty standard. Most of the time, all we do is draw the rounded corners and add gradient to the background. We use GDI+ for ...

Performance Testing for Calculation-Heavy Programs

What are some good tips and/or techniques for optimizing and improving the performance of calculation heavy programs. I'm talking about things like complication graphics calculations or mathematical and simulation types of programming where every second saved is useful, as opposed to IO heavy programs where only a certain amount of speed...

Fastest way to enumerate through turned on bits of an integer

What's the fastest way to enumerate through an integer and return the exponent of each bit that is turned on? Have seen an example using << and another using Math.Pow. Wondering if there is anything else that's really fast. Thanks. ...

SQL Server 2008 Page/Row Compression Thoughts

Have other people here played with SQL Server 2008 Compression at either the page or the row level on their datasets much? What have your impressions been on performance both speed and disk-space wise? Has anyone ever seen compression demonstrably hurt performance? On some of our huge fact tables we've been playing around and noticing...

Performance Evaluation of Linux Scheduler

Hi I have done some simple changes to the scheduler in the Linux Kernel. Now, I would like to see how those changes affect the response time of the system; in other words, I would like to know how long a context switch takes with my modifications compared to the original scheduler. A straightforward approach would be to use the time st...

Dealing with large result sets in SQL Server Analysis Services

I have a Database that contains data about articles,structures and manufacturers. Meaning an article is linked to 1 manufacturer and to N structure-nodes (think as article-classification-nodes). Querying articles using T-SQL with a lot of conditions is currently too slow to be usable for an e-shop, even with good hardware and properly i...

WPF Memory Usage

Application: WPF Application consisting of a textbox on top and a listbox below Users type a string in the TextBox to find employees, and search results are displayed in the ListBox ListBox uses DataTemplates to display elements (shows employee name, department, phone and a thumbnail picture.) Implementation: At application startu...