performance

Performance impact of having a data access layer/service layer?

I need to design a system which has these basic components: A Webserver which will be getting ~100 requests/sec. The webserver only needs to dump data into raw data repository. Raw data repository which has a single table which gets 100 rows/s from the webserver. A raw data processing unit (Simple processing, not much. Removing invalid...

I want to use WMI or Java in ColdFusion on Windows to get performance data.

I am rolling my own simple web-based perfmon, I am not happy with some of the data I can get like cpu usage, which i use via a sql query. I am able to get memory usage just fine...I will attach a screenshot, so you can see what I currently have for my main/home/dashboard page. I am currently using webcharts3d, which i am loving being ab...

Performance of extra string comparisons vs HashMap lookups

Assume I am running either of the code snippets below for a list of 1000 Event entries (in allEventsToAggregate). Would I see a performance improvement in the first implementation if the events in allEventsToAggregate are sorted by customerId, with each customer having roughly 3 events? This is essentially a question of string comparison...

Are helpers really faster than partials? What about string building?

I've got a fancy-schmancy "worksheet" style view in a Rails app that is taking way too long to load. (In dev mode, and yes I know there's no caching there, "Completed in 57893ms (View: 54975, DB: 855)") The worksheet is rendered using helper methods, because I couldn't stand maintaining umpteen teeny little partials for the different sor...

Application pool memory gets out of control after updating dlls

We are experiencing Memory issues every time we update the dll's using SVN. The IIS process(w3wp.exe) takes up more than 1GB of memory which is usually 300 - 400 Mb under normal conditions. So every time we update dll's we had to recycle the application pool. Is it because the old dlls are still cached even after updating them? Do we nee...

Is there any library for C# providing a thread pool that will execute no more than X tasks per unit of time?

A problem is that a particular resource cannot handle more than 1 request per second and I want to pass that parameter to a thread pool that manages all concurrent calls to that resource. Is there any library that offers such kind of custom thread pool or I should look forward to implement my own? Thanks. ...

jQuery() slower than getElementById

I was running some performance tests to see if i could use jQuery directly instead of Ext's wrapper. To start with i wanted to compare jQuery(#id) to doc.getElementById, but i must be doing something wrong, since jQuery(#id) is awful slower. var searchDoc = searchWin.document; var jqSearchDoc = jQuery(searchWin.document); for (var i=0; ...

Query performance for criteria against date ranges

Here's a table: CREATE TABLE Meetings ( ID int PRIMRY KEY IDENTITY(1,1) StartDate DateTime NOT NULL, EndDate DateTime NULL, Field1 varchar(50), Field2 varchar(50), Field3 varchar(50), Field4 varchar(50) ) There's several thousand rows. The data ranges can be varying sizes (from a couple days up to 50 years). Here's a q...

Indexed Table DML Performance when you dont use index

Hi All, I am running some performance tests about indexes and DMLs. I could not understand some test result in the case of when you do not use indexes on an indexed table DMLs perform slower than the non-indexed tables. I was expecting to run the both in similar time intervals. The plsql block i used is below:(TINDEX_PERFORMANCE_TEST_1 ...

Performance of FOR vs FOREACH in PHP

First of all, I understand in 90% of applications the performance difference is completely irrelevant, but I just need to know which is the faster construct. That and... The information currently available on them on the net is confusing. A lot of people say foreach is bad, but technically it should be faster since it's suppose to simpl...

Visual Studio hangs when changes are made to source codes in Asp.Net App_Code folder

Hi, My Visual Studio will hang everytime I make some small changes to the Codes in the App_Code folder. I checked in the folder.. there are about 91 Files in 62 Folders. Any suggestions on how I can improve its performance? ...

Request for Comments: fast hashed base class for dictonary keys

In one of my aplications I have to use many dictonarys with custom objects as keys. To improve the performance of the lookups I implemetet an base class that overrites GetHashCode. It seams to work but somehow I still have a bad fealing about it so I decided to post my code and I would be gratefull for any tips or coments. (omg I forgot ...

Performance impact of autoboxing

Usually the compiler generates code to perform boxing and unboxing. But what does the compiler, if the boxed values are not needed? Is the (Oracle standard) compiler smart enough to optimize it away? Take a look at this method: public static void requireInRange(int index, Object[] array) { if(index < 0 || index >= array.length) ...

How does initialization to a value compare in performance to assignment?

Hi, I read that for user-defined types, postponing the defintion of a variable until a suitable initializer is available can lead to better performance. why? ...

iPhone and SQLite: How to handle the database connection with multiple classes?

Hi, I have some doubts about SQLite... My app uses only one table (encapsulated in a data logic class) to store small data, the connection is opened in didFinishLaunchingWithOptions and finalized in applicationWillTerminate (yes, I know that in iOS4 applicationWillTerminate is only called by iSO if necessary, but I write on database at e...

Windows Service startup time

Is there a way to programmatically retrieve start-up time/duration for all the Windows Services that have started during boot in Windows XP? That is, the time the service was initialized to getting to the "started" state. Thank you in advance! P.S. I'm not asking for software recommendation. ...

Can const-correctness improve performance?

I have read numerous times that enforcing const-correctness in your C or C++ code is not a good practice with regards to maintainability, but also it may allow your compiler to perform optimizations. However, I have read the complete opposite, too that it does not affect performance at all. Therefore, do you have examples where const c...

Performance issues on ASP.NET MVC 2 with SQL Server

Hello, EDIT: I think it's a problem on the subquery on the LINQ-generated query, it get all the records... But I don't know how could I fix it I have made a simple ASP.NET MVC 2 application that does SELECT queries on a view, I get really poor performance, and while doing a simple benchmark with jMeter (10 conccurents connection) while...

How to get around the performance issues with Buffer.put() and Android OpenGL

It is a Java issue in general, though in this particular case I am using Vertex Arrays in Android for OpenGL. To use this basic GL system, you must use Java's Buffer system in native allocation mode. This is very slow on Java. And roughly 40-50% of my entire application's time is spent inside of buffer.put(). Is there any way to speed t...

How to import *huge* chunks of data to PostgreSQL?

I have a data structure that looks like this: Model Place primary key "id" foreign key "parent" -> Place foreign key "neighbor" -> Place (symmetryc) foreign key "belongtos" -> Place (asymmetric) a bunch of scalar fields ... I have over 5 million rows in the model table, and I need to insert ~50 million rows into ...