performance

SQLite + Core Data Vs. File system on Iphone App that shows photos. What's more performant?

Hello, I have an application where the user will navigate around a set of photographs. What's best in terms of performance for this scenario, SQLite + Core DATA for persisting the photos as NSData objects or having the photos as png files directly on the file system? thanks. ...

Why is PostgreSQL so slow on Windows?

We had an applicationg running using MySql. We found MySql was not suitable for our app after we found that it didnt support some of the GIS capability that PostGIS has (note: mysql only supports minimum-bounding rectangle GIS search). So we changed our DB to PostgreSQL. We then found out that Postgresql 8.2 running on Windows is so muc...

How do programming/design decisions affect performance under the hood?

Hi, In the current project I am working on I have come across a piece of code which seems to be overblown. I considered rewriting it to avoid more objects in memory than need be, and had trouble making a decision about whether the performance benefits from refactoring would be worth the time, and whether the current design will impact p...

Optimizing equals() method

The equals() method (and for that matter, also the compareTo() method) can become a performance hotspot (e.g. in a high-traffic HashMap). I was wondering what tricks folks have adopted to optimize these methods for these cases when they prove necessary. IntelliJ IDEA, for example, generates the following: public boolean equals(Object o...

Why does reflection not perform well in .NET?

I am interested to know the technical reasons: why does reflection not perform well in .NET? ...

.NET benchmarking frameworks

Are there any .NET frameworks for writing micro-benchmarks like Japex or this (both are for Java)? ...

WCF : maxConcurrentCalls has exhausted

Hello, I'm in the process of troubleshooting a WCF Service that hangs at some point. The service behavior is the following: [ServiceBehavior( InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple )] Throttling parameters are : <serviceThrottling maxConcurrentCalls="50" maxConcurrentSessions="50...

Research: Looking for OpenSource Rails App mit performance issues

Hi, I'm looking for an open source web application written in ruby on rails, that have had (or still have!) some performance issues in the past. I'd like to carry out some tests on it during my thesis. Thx for any hints! ...

Trying to speed up a SQLITE UNION QUERY

I have the below SQLITE code SELECT x.t, CASE WHEN S.Status='A' AND M.Nomorebets=0 THEN S.PriceText ELSE '-' END AS Show_Price FROM sb_Market M LEFT OUTER JOIN (select 2010 t union select 2020 t union select 2030 t union select 2040 t union select 2050 t union select 2060 t union select 2070 t ) as x LEFT OUTER JOIN sb_Selection S ON S....

What exactly gc_heap::plan_phase does?

Hello, I'm trying to debug a .net windows service that is spending lot of his time in GC. Using windbg during collections I discovered that most of the time is spent in: 00000000`0279e8e0 00000642`7f5368a3 mscorwks!WKS::gc_heap::plan_phase+0x50c 00000000`0279ea90 00000642`7f94ef4e mscorwks!WKS::gc_heap::gc1+0x73 00000000`0279eae0 000...

Optimizing a Dictionary for comparison when the key is based upon several identifying attributes.

I have the following code: if (!this._masterAccountDefinitions.ContainsKey( outletName.ToLower(CultureInfo.CurrentCulture) + "/" + officeName.ToLower(CultureInfo.CurrentCulture)) ) { //Add new item to list } Essentially, the dictionary is keyed by the combination of an Outlet Name and Office Name. This code will be ...

Perfomance of TypeCasting

Hi there, is there any measurably performance difference between ((TypeA) obj).method1(); ((TypeA) obj).method2(); ((TypeA) obj).method3(); and var A = (TypeA) obj; A.method1(); A.method2(); A.method3(); when used alot of times? I often see something like if (((TextBox)sender).Text.Contains('.') || ((TextBox)sender).Text.Contain...

Dataset times out while query runs immediately

I am running a query directly, it is trivial in nature: SELECT * FROM [dbo].[vwUnloadedJobDetailsWithData] WHERE JobId = 36963 When I run this from Management studio the query doesn't even take a second. When I run it from within the table adapter it times out. I have fixed this multiple times, but the fix is ludicrous. If I delete...

Server starting slowly

I am using MyEclipse, and I have a local Glassfish server controlled by the IDE. When I am at work, having a fast internet connection, the server starts quickly. However, when I am at home, not having as fast an internet connection, the server starts slowly. The server is on my local box, why would the internet connection speed matter ...

OpenCV Video capture and fps problem

Hi to all, I'm capturing video from my webcam using OpenCV on MacOSX. It works fine but when I try to play on QuickTime my captured video it plays too fast. i.e. I capture from camera for 10 seconds but when I play on QuickTime the video is 2 seconds. I've tried to change fps from 25 to 10 and It's works quite fine, but I'm sure it's ...

What's the fastest way to load a text or ntext SQL Server column?

I do this as simple as possible, but sometimes the query takes 3+ second. I'm using a basic parameterized query like this: SELECT TextStuff FROM MyInfo WITH (NOLOCK) WHERE MyInfoID=@MyInfoID Is there a faster way to do this? Would performance improve if I converted the ntext column into an nvarchar(MAX) column? ...

Is code clearness killing application performance?

As today's code is getting more complex by the minute, code needs to be designed to be maintainable - meaning easy to read, and easy to understand. That being said, I can't help but remember the programs that ran a couple of years ago such as Winamp or some games in which you needed a high performance program because your 486 100 Mhz wo...

best way to get friends actions for a social network php/mysql

I have a social network similar to myspace but I use PHP and mysql, I have been looking for the best way to show users bulletins posted only fronm themself and from users they are confirmed friends with. This involves 3 tables friend_friend = this table stores records for who is who's friend friend_bulletins = this stores the bulletins...

Measuring the HTTP response time back to the client using only the server

I need to measure how long it takes to send a web response to a client - from the server-side only. I know there are ajaxian and client-side ways of doing this but I am limited to a server-side only way of measuring the time to the client. Is it possible to roughly approximate this using the ACK sent back from the client browser after t...

.Net - When is List<T>.ForEach prefered over a standard foreach loop?

The generic list class has a .ForEach(Action<T> action) method. Now i've done some simple timings of how they both perform and it seems that the generic ForEach is the poorer performer. The (Snippet Compiler Friendly) code is below - public static class timer{ public static long foreachloop = 0; public static long Gforeachloo...