performance

Loading Google App Engine app from one file for all the URLs or one file per URL for loading speed

I have a small web app running on AppEngine and have all my URL processing in one file and the other processing done in another file that is imported at the top of the main python. e.g. import wsgiref.handlers from wsgiref.handlers import format_date_time import logging import os import cgi import datetime from time import mktime #Go...

IHTTPModule perfomance hit?

I'm implementing an IHttpModule as described in this question. Since we're examining every request, I'm worried there may be a performance hit. Has anyone run into performance issues implementing IHttpModules? ...

iphone large NSArray of strings performance woes

I have an Iphone app with a large, nested NSArray of strings. The NSArray goes 3 levels deep, and there are a total of approximately 15,000 strings at the deepest levels. The vast majority of the strings have fewer than 20 characters. Every so often, my app hangs for a while, then resumes working after 5-25 seconds or so. This is obv...

UNION ALL Performance IN SQL Server 2005

Hello. I have a query with a long chain of CTEs which ends with SELECT RegionName, AreaName, CityName, SubCityName, StreetName FROM tDictionaryStreets UNION ALL SELECT RegionName, AreaName, CityName, SubCityName, StreetName FROM tDictionaryRegions The execution time of this query is 1450 ms. When I execute these 2 SELECTs separatl...

Performance problems when combining jquery and jquery-ui

I am trying to reduce the number of http requests for a site I am resonsible for. At the moment we use jquery and jquery-ui, which are loaded as 2 separate .js files. I have tried to combine them together in a single file (jquery-all.js) and use the combined file instead. This works as expected, but adds about 1 second to the page load...

Index view: How to choose the Clustered Index?

Hi folks, I'm going to do an indexed view, based on three tables with inner and outer joins between them (SQL Server 2005). I will run all kind of queries against this view. So, I wonder what is the best way to choose which index to be clustered. What are the criteria or is there any tools to help me around. (Sorry if my question is d...

Hybrid Rails Caching Options, am I reinventing something?

Well, not really reinventing, however, we have a large content-based website which handles load (after we fixed the SQL pooling issue) to a certain point, then we just run out of steam. A lot of this is due to bad code we are trying to fix up, but a lot is just due to the level of requests etc. We were considering page caching, because ...

Performance problem with backgroundworkers

I have 15 BackgroundWorers that are running all the time, each one of them works for about half a second (making web request) and none of them is ever stopped. I've noticed that my program takes about 80% of my computer's processing resources and about 15mb of memory (core 2 duo, 4gb ddr2 memory). It it normal? web requests are not hea...

Tips for reach performance in OpenGL simulations

Hi, i would like to know some tips, articles or books about performance in OpenGL based simulations ...

Filtering duplicities by another table.

Hello, I have two (example) tables here A) data_table: +----------+-------+ | location | value | +----------+-------+ | 43 | 38 | | 44 | 31 | | 3 | 31 | | 11 | 38 | | 47 | 35 | | 49 | 31 | | 50 | 31 | | 55 | 16 | | 56 | 16 | | 59 | 35 | ...

What is the most efficient way to append one std::vector to the end of another?

Let v1 be the target vector, v2 needs to be appended to the back of it. I'm now doing: v1.reserve(v1.size() + v2.size()); copy(v2.begin(), v2.end(), back_inserter(v1)); Is this the most efficient way? Or can it maybe be done just via copying a chunk of memory? Thanks! ...

Why is Any slower than Contains?

I designed the following test: var arrayLength=5000; object[] objArray=new object[arrayLength]; for(var x=0;x<arrayLength;x++) { objArray[x]=new object(); } objArray[4000]=null; const int TestSize=int.MaxValue; System.Diagnostics.Stopwatch v= new Stopwatch(); v.Start(); for(var x=0;x<10000;x++) { objArray.Contains(null); } v.S...

How to find resource intensive queries in Django

How to find the execution time for various Model API Calls in Django. ...

Core Data pattern: how to efficiently update local info with changes from network?

I have some inefficiency in my app that I'd like to understand and fix. My algorithm is: fetch object collection from network for each object: if (corresponding locally stored object not found): -- A create object if (a nested related object locally not found): -- B create a related object I am doing the checking on l...

Django runserver performance problem on localhost

Hi, I have a strange problem in Django development environment. I have changed my ISP and my setup is as follows: ISP -> Modem -> WirelessRouter -> Desktop (connected wirelessly) When I start my development enviornment and access the env http://localhost:8000, the performance is horrible, each request takes couple of around 10 second...

Strange C++ performance difference?

I just stumbled upon a change that seems to have counterintuitive performance ramifications. Can anyone provide a possible explanation for this behavior? Original code: for (int i = 0; i < ct; ++i) { // do some stuff... int iFreq = getFreq(i); double dFreq = iFreq; if (iFreq != 0) { // do some stuff with iFre...

SQL Server: Improve PROCEDURE without using CURSOR

I am looking for a way to write the below procedure without using a CURSOR or just a better performing query. CREATE TABLE #OrderTransaction (OrderTransactionId int, ProductId int, Quantity int); CREATE TABLE #Product (ProductId int, MediaTypeId int); CREATE TABLE #OrderDelivery (OrderTransactionId int, MediaTypeId int); INSERT INTO #P...

Is there a better way to write this SQL than using WHERE ... IN (subquery)?

is there a better way to write this SQL than using WHERE ... IN (subquery)? SELECT device.mac, reseller.name, agent.name FROM device LEFT JOIN global_user ON device.global_user_id = global_user.id LEFT JOIN agent ON global_user.id = agent.global_user_id LEFT JOIN reseller ON global_user.id = reseller.global_user_id...

Programmatic Load Testing?-- outside Visual Studio

I was just wondering if there is a FREE framework I can use to programmatically run WCF load tests outside of Visual Studio. I've seen that NUnit provides such functionality for unit testing, but can you do load testing with it? Any help would be appreciated. Thanks. ...

Multiple threads slowing down overall dictionary access?

I am profiling a C# application and it looks like two threads each calling Dictionary<>.ContainsKey() 5000 time each on two separate but identical dictionaries (with only two items) is twice as slow as one thread calling Dictionary<>.ContainsKey() on a single dictionary 10000 times. I am measuring the "thread time" using a tool called ...