performance

which has better performance? static versus objects

I have designed a C# console application to merge and split huge files (about 4GB of size) using OOP design. It involves reading/writing xml, flat-files, and images. I have classes for readers and writers. The merging took about 00:12, while the splitting took more than 04:30 hours. Then I've enhanced the performance of the splitting t...

Refreshing a page continuously crashes IE

I need to poll the server for updated contents. So I added a META REFRESH tag to the page. But it seems that META REFRESH has memory leak issues and it crashes IE. What is the best way to poll data from server continuously? My app is quite old (partly ASP and partly asp.net). I can't invest on technologies like HTTP Push... ...

Java EJB entity beans performance

How performant is the entity bean? Would it be too much to ask if I want 1000 objects per table (probably about 20 tables) across 5 processes where some processes might be changing the objects as often as 60 times a second? Are there any resources out there on the limitations of the entity bean? Thanks for any help! ...

MySQL query randomly takes "forever"

...

Iterating through a large table with performance in mind

If I need to check an entire table to see if a condition is true (e.g. every Ticket column has an ID with a certain suffix). What would be a good way of going about this, performance wise? The table is quite large so if I go through every row, that's a lot of time hitting the database. Cursors are slow, so that wouldn't really be an ele...

LINQ vs regular enumeration

When you have some enumeration methods in some of your types (i.e. a custom collection), is it better to use LINQ syntax or just old school enumeration (for/foreach)? Using .NET 3.5 is a given. I am asking this for maximum performance and readability. The application is also designed to be parallel. Which one would you favor? ...

Additional hash lookup using 'exists'?

I sometimes access a hash like this: if(exists $ids{$name}){ $id = $ids{$name}; } Is that good practice? I'm a bit concerned that it contains two lookups where really one should be done. Is there a better way to check the existence and assign the value? ...

SQl Server tables: to heap or not to heap?

I have recently noticed that we have a number of tables stored in heaps (no clustered index). Would you create clustered indexes on them selectively, across the board, or not at all? Any other wisdom or advice? There are some "codes" tables with 25 or so rows. However, there are several with well over a million rows. EDIT of the "bi...

Visual Studio 2008 very slow

I am using Visual Studio 2008 on a Windows 7 virtual machine for building a ASP MVC app. I have noticed recently that it has become painfully slow, some pages take upwards of 60 seconds to display. If I deploy these pages to a devserver to test they are very quick, almost instant. Also, if I manually step through the code to display the ...

Command pattern without virtual functions (C++)

For performance reasons, I am using the the Curiously Reoccuring Template Pattern to avoid virtual functions. I have lots of small commands which execute millions of times. I am trying to fit this into the Command Pattern. I want to add tons of commands to a queue, and then iterate through them executing each one by one. Each Command...

Linq to SQL : Optimizing queries with Sql Server Compact Edition

Hi I've been using Linq to SQL against Sql Server CE. Database is read only, so I can have several assumptions. In order to refrain from accessing the file system, my initial approach was to cache needed entities to application memory and using linq to objects against them. While it works well for limited queries, directly using Linq...

OpenGL: Fastest way to draw a mixture of triangles and quads?

I have a mesh data structure with polygons that can be either triangles and quads. What is the fastest way to draw this using OpenGL? The slow way is to iterate over the structure and for each polygon to make the appropriate glBegin() .. glEnd() with either GL_QUADS or GL_TRIANGLES. I would like to avoid having to do glBegin() .. glEn...

WPF Data virtualizing ListView

In our current WinForms app, we are displaying millions of records in ListView, using virtualization. Rows are loaded from DB as they are requested. This works well, with good performance. This is a showstopper for migrating to WPF for us. We need data virtualization in a ListView, like WinForms 2.0 has. Do you know a decent third-pa...

Something is wrong with Log4Net?

I've been using Log4Net on a few high traffic websites for a couple of years, and I cannot say that I am a happy customer. So, wanted to see if anybody else has the same concerns: The CPU overhead with RollingFileAppendor is massive. Some of my websites need to trace 5-10GB per day, and when I enable logging, the CPU utilization more t...

Objective C message dispatch mechanism

I am just staring to play around with Objective C (writing toy iPhone apps) and I am curious about the underlying mechanism used to dispatch messages. I have a good understanding of how virtual functions in C++ are generally implemented and what the costs are relative to a static or non-virtual method call, but I don't have any backgrou...

Can WPF render a line path with 300,000 points on it in a performance-sensitive environment?

A simple XY line graph: The X axis will represent the complete range of possible rating percentages, from 0% on one end to 100% on the other. Specifically, the X value will represent our rating cut-off, or the minimum rating a transaction can have before it is no longer acceptable. The Y axis will show values from 0 to the total number o...

2008 SQL Server Express Load Balancing

Hi, I have 3 home PCs that have 2008 SQL Server Express instances installed on each one of them... but right now only one has my database and I'm also running an application on that machine that requests a bunch of data from the database. I don't know a whole lot about server architecture, but I have read some guides from Microsoft's we...

How can I know how much memory Eclipse plugins use (separately)

Is there a way to know how much memory is consumed by each Eclipse plugin separately? ...

Replicating String.split with StringTokenizer

Encouraged by this, and the fact I have billions of string to parse, I tried to modify my code to accept StringTokenizer instead of String[] The only thing left between me and getting that delicious x2 performance boost is the fact that when you're doing "dog,,cat".split(",") //output: ["dog","","cat"] StringTokenizer("dog,,cat") // ...

How to regulate the amount of printouts generated by a logging instruction produces over time?

How can I limit a program log printouts to a maximum of X printouts within Y seconds? Programming server side with java.util.logging, my code has a lot of info, warning, and error statements like: s_logger.logp(Level.WARNING, myClassName, myMethodName, "msg.code.in.properties.file"); On the one hand, I do want to see the warning messa...