performance

Reducing roundtrips between client and server

Hi, We are developing desktop application in vs2008 with winforms and sql server 2008.At present, we make lot of dbase calls(linq to sql) on form load, so this make the application real slow.One option is to load all the data required at the start of application load, and store it in a cache(just static collections).What other options w...

Collection.synchronizedMap vs synchronizing individual methods in HashMap

What is the difference between a Collections.synchronizedMap() and a wrapper around a HashMap with all the methods synchronized. I dont see any difference becuase Collections.synchronizedMap() internally maintains the same lock for all methods. Basically, what is the difference between the following code snippets Class C { Obje...

Box2d: mousejoint jerky

Hi to all! I'm making my first iPhone game. I have increasing number balls that can be dragged. I had some problems with inertial delay of mousejoint and I configured them as follows: b2MouseJointDef md; md.body1 = _groundBody; md.body2 = body; md.target = p; md.maxForce = 10000.0f * body->GetMass(); md.dampingRatio = 0; md.frequencyH...

Rails: huge data import to three connected tables...

Hi everybody, Im looking for a good way to solve my performance issues in my rails application. I have three tables which have: one to one to many connections in between. If I want to fill in 130 items of the first table with all the data for the underneath tables, It results in about 1000 queries and takes about 10 seconds (SQLite DB)....

How to Clear down Query Execution Statistics in SQL Server 2005/2008

Based on getting Query Execution Statistics using this extremely useful piece of SQL obtained from this post Most Executed Stored Procedure - Stack Overflow: SELECT TOP 100 qt.TEXT AS 'SP Name', SUBSTRING(qt.text, qs.statement_start_offset/2, CASE WHEN (qs.statement_end_offset = -1) THEN LEN(qt.text) ELSE (qs.statement_end_offset ...

Casting (int?)null vs. new int?() - Which is better?

I use Nullable<T> types quite a lot when loading values into classes and structs when I need them to be nullable, such as loading a nullable value from a database (as the example below). Consider this snippet of code: public class InfoObject { public int? UserID { get; set; } } // Load the ID into an SqlInt32 SqlInt32 userID = rea...

Sql Server query perfomance

I have contacts that can be in more than one group and have more than one request. I need to simply get contacts for a specific group that have no specific requests. How do I improve the performance of this query: SELECT top 1 con_name , con_id FROM tbl_group_to_contact gc INNER JOIN tbl_contact c ON gc.con_id = c.i...

jQuery, What's Best, Have All the Binds in One Single File For an Entire Site or on a per Page Basis?

I'm in the middle of building a web app with heavy use of jQuery plugins and lots of bindings. The backend was developed with a template system which only allows (as of now) to place all scripts in that one HTML file. We will use YUI compressor to merge all these into one. Now, for bindings, how bad is it to have binds in an HTML file ...

Questions about caching in high-traffic website.

Suppose we are building an E-commerce site that allows consumers to search for products by typing in keywords. Say there are at most 200,000 products, and there are millions of consumers using the system. Let’s say the product table is updated fairly frequently. Since the number of products is not that high and we can probably store the ...

How To improve ASP.NET MVC Application Performance

How do you improve your ASP.NET MVC application performance? ...

PHP MYSQL to XML - Efficient File Generation

Hi there, I run a price comparison data engine, and as we are collecting so much data im running into pretty serious performance issues. We generate various XML files, one per product and within the product data is each Online shop we grab data from, with their price, link, description, etc. We have multiple feed parsers/scrapers which ...

Warming up high throughput Java apps

I recently learned about scenarios which require warming up an app (with high throughput requirement) before they start serving real requests. The logic behind this was to allow JIT to do its performance magic! Is this a norm for Java apps or is this generally done for memory heavy (footprint) apps? ...

Does using large libraries inherently make slower code?

I have a psychological tic which makes me reluctant to use large libraries (like GLib or Boost) in lower-level languages like C and C++. In my mind, I think: Well, this library has thousands of man hours put into it, and it's been created by people who know a lot more about the language than I ever will. Their authors and fan...

Pattern for handling concurring timeouts

Hi! I'm writing a component that reads data from a vehicle CAN-bus and offers a subscribe-interface to be used by the upper layer components. Part of the interface is that the subscriber can define a time of which a certain frame is considered to be timed out, and when that occurs the subscriber is notified. Since the load of the bus ...

JMS for email scalability

Does it make sense to use JMS and JavaMail together to build a scalable email solution? Presently these are the 2 options I am considering: -- Build a RESTful email center API and call it from all over the web app. -- Use JMS in between the web app and the email center. The 'email center' as I call it will probably be implemented us...

Performance issue using Javas Object streams with Sockets

I'm trying to do local IPC using Sockets and Object streams in Java however I'm seeing poor performance. I am testing the ping time of sending an object via an ObjectOutputStream to receiving a reply via an ObjectInputStream over a Socket. Here's the Requestor: public SocketTest(){ int iterations = 100; try { Socket s...

linq to Db4o not using index

Hi, I'm trying db4o and i'm having bad performance when using linq to db4o. (using 7.12) Here is my configuration : var configuration = Db4oFactory.Configure(); configuration.ObjectClass(typeof(MyTest)).ObjectField("MyInt").Indexed(true); Here is the object i'm trying to save : public class MyTest { public int M...

Performance issues with NSMutableArray and NSArray

I've been programming C/C++ for 20 years but I'm new to objective-c and Coco and have some questions about the performance of NSMutableArray and NSArray. I need an container much like the stl list container, but coco doesn't seem to have one and inserting and removing elements from the middle of MSMutableArray seems slow, but treating ...

What makes STL fast?

If one implements an array class the way it is commonly implemented, its performance is slower compared to its STL equivalent like a vector. So what makes STL containers/algorithms fast? ...

Editing markup of large controls/pages in Visual Studio 2008 pegs one core of CPU

When editing a markup file (javascript mixed with html and ASP.NET tags) of several hundred lines in Visual Studio 2008, the devenv process seems to lock up one core of my CPU. The excessive processing only occurs while I am typing, so it is obvious that my code is being parsed and analyzed. This occurs even when I am editing some javasc...