performance

What is the best method for paging with datagrid performance?

On a site with a high number of users, should paging be handled in code, or with a stored procedure. If you have employed caching, please include your success factors. ...

Fastest Hash Algorithm for Text Data

I'm trying to choose a hash algorithm for comparing about max 20 different text data. Which hash is better for these requirements? Less CPU Consumption Small footprint (<=32 bytes) Collision is not a big deal Can be generated from .NET Framework 2 (shouldn't be a 3rd party library) I'm using hash for less memory footprint and compa...

Slow SelectSingleNode

I have a simple structured XML file like this: <ttest ID="ttest00001", NickName="map00001"/> <ttest ID="ttest00002", NickName="map00002"/> <ttest ID="ttest00003", NickName="map00003"/> <ttest ID="ttest00004", NickName="map00004"/> ..... This xml file can be around 2.5MB. In my source code I will have a loop to get nicknames In each ...

What programming language implementation benchmarks are there?

I remember from my old BASIC programming days that for extra performance, you could use a BASIC compiler (instead of the runtime interpreter), but for ultimate performance, the answer was assembly code. Today, when performance is crucial, I guess assembly language is still the ultimate optimisation answer. Going for a less extreme solut...

SQL Server 2005 Scalar UDF performance

I have a table where I'm storing Lat/Long coordinates, and I want to make a query where I want to get all the records that are within a distance of a certain point. This table has about 10 million records, and there's an index over the Lat/Long fields This does not need to be precise. Among other things, I'm considering that 1 degree ...

Python Performance - have you ever had to rewrite in something else?

Has anyone ever had code in Python, that turned out not to perform fast enough? I mean, you were forced to choose another language because of it? We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Java) because it rel...

select top 1000, but know how many rows are there?

SQL Server 2005 I have 10 million rows in DB, and run a select (with lots of "where" and joints.. pretty complex). The results are presented in grid (think goolge results) and because of that, the user cannot possibly use more then 1000 results. So I limit my SQL with a TOP 1000. Problem: User still wants to know that there are 5432 ...

How can a program have a high virtual byte count while the private bytes are relatively low on Windows 32-bit?

I'm trying to get a better understanding of how Windows, 32-bit, calculates the virtual bytes for a program. I am under the impression that Virtual Bytes (VB) are the measure of how much of the user address space is being used, while the Private Bytes (PB) are the measure of actual committed and reserved memory on the system. In particu...

Is this laptop good enough for Visual Studio?

For HP 2133 Mini: 1.2 Ghz CPU 1 GB RAM Windows XP 5400 RPM HDD I'm planning to install Visual Studio 2005 (assuming it's faster than 2008). I've seen http://stackoverflow.com/questions/8440/visual-studio-optimizations question so I'll take those into the account. But do you think Visual Studio 2005 is going to work in an acceptable ...

Database perform advice when batch importing large datasets

I'm building a database web application using Java and Hibernate's JPA implementation. The application tracks objects. It also has to batch import objects from a legacy source. For example, let's say we're tracking people. The database has tables called Person and Address. There are corresponding JPA entity and DAO classes. On top of t...

Performance degrades when compiling with _win32_winnt=0x0501 instead of 0x400

Is anyone aware of any performance implications from changing the _win32_winnt from 0x400 to 0x0501? I am compiling C++ on VS2005. My Application is very communications oriented, doing quite a lot of Winsock work. ...

ConfigurationManager.AppSettings Caching doubt

We know that IIS caches ConfigurationManager.AppSettings so it reads the disk only once until the web.config is changed. This is done for performance purposes. Someone at: http://forums.asp.net/p/1080926/1598469.aspx#1598469 stated that .NET Framework doesn't do the same for app.config, but it reads from the disk for every request. Bu...

Why 'delete from table' takes a long time when 'truncate table' takes 0 time?

(I've tried this in MySql) I believe they're semantically equivalent. Why not identify this trivial case and speed it up? ...

How to make Linux GUI "usable" when lots of disk activity is happening

If I start copying a huge file tree from one position to another or if some other process starts doing lots of disk activity, the foreground app (GUI) slows way down. For example, take a 2gb file tree with 100k files in it. Open a console and do cp -r bigtree bigtree2. Then go to firefox and start browsing. Firefox is almost unusable. Ev...

What are the most effective ways to use Lua with C#?

From my understanding, Lua is an embeddable scripting language that can execute methods on objects. What are the pitfalls to avoid? Is is it feasible to use Lua as an interpreter and execute methods in an web environment or as a rule engine? ...

stopwatch accuracy

How accurate is System.Diagnostics.Stopwatch? I am trying to do some metrics for different code paths and I need it to be exact. Should I be using stopwatch or is there another solution that is more accurate. I have been told that sometimes stopwatch gives incorrect information. ...

Credibility of benchmarking within virtual machines?

How credible are the benchmarks carried out within a virtual machine, as opposed to real hardware? Let's dissect a specific situation. Assume we want to benchmark the performance impact of a recent code change. Assume for simplicity that the workload is fully CPU bound (though IO bound and mixed workloads are also of interest). Assume t...

Max files per directory in S3

Hi, If I had a million images, would it be better to store them in some folder/sub-folder hierarchy or just dump them all straight into a bucket (without any folders)? Would dumping all the images into a hierarchy-less bucket slow down LIST operations? Is there a significant overhead in creating folders and sub folders on the fly and ...

Good *free* markov modeling tools?

I would like to use Markov models for some architecture simulations, but don't have a budget to buy anything like, eg, SHARPE. Does anyone know of a freeware tool, either platform-independent or available for Mac OS/X ...

Performance Testing for Classic ASP pages?

I would like to know how to do performance testing for the old asp pages. Any tools out there that you've used? ...