performance

Linq queries in Entity Framework 4. Horrible perfomance.

Hello, guys! In my project I'm using EntityFramework 4 for working with data. I found horrible performance problems with a simple query. When I looked at the profiler on a sql query, generated by EF4, I was shocked. I have some tables in my entity data model: It looks pretty simple. I'm trying to select all product items from specif...

WCF Trace Log analysis - help

I am having trouble deciphering a WCF trace file, and I hope someone can help me determine where in the pipeline I am incurring latency. The trace for "Processing Message XX" is shown below, where there appears to be 997ms delay between the Activity Boundary and the transfer to "Process Action" where my service code is executed (which ta...

Programmatic access to Mac OS X system performance statistics?

When you run top or Activity Monitor on OS X, you see a variety of performance data for the whole system - current and historic CPU usage, physical memory and swap space usage, disk activity, and so on. On Linux and some other Unixen, you can access this data in your own programs using syscalls or looking in the /proc and/or /sys pseudo...

iphone app mysteriously getting slower and slower

I have an app. It starts out fine, but the longer I run it, the slower it gets. Instruments shows only a few hundred bytes of leaks. How can I find the source of the problem? ...

What are some things to consider when letting other sites use scripts directly from your site?

I have a jQuery function that runs through the page, finds links to a certain domain, does an ajax call to get some data and crafts a tooltip when the visitor hovers their mouse over the link. Just like wowhead.com/tooltips. What are some things to consider when allowing other sites to include your script files, linked directly from you...

Howto: Javascript files always up-to-date

I have a .NET web applications which uses a lot of javascript. The .aspx and the .js files go hand-in-hand together. Problem: The .aspx files are always up-to-date on the client (not cached) but the .js files might well be cached. This is even a problem if the files are only cached for one session since users are spending many hours on ...

How can I make my Perl web crawler go faster?

I've been knocking up a little pet project the last two days which consists of making a crawler in Perl. I have no real experience in Perl (only what I have learned in the past two days). My script is as follows: ACTC.pm: #!/usr/bin/perl use strict; use URI; use URI::http; use File::Basename; use DBI; use HTML::Parser; use LWP::Simple...

LinQ query has long duration because of View recalculation

Hello, I've created a View in the database that gives me a representation of an organisation structure AT THIS POINT IN TIME. Indeed, I use a getdate() in this view. I've imported the view in my edmx and wrote queries based on this view. Most queries join a table with the view and return a DTO. These queries work fine and are fast (200m...

what mysql query is better?

i got 2 mysql queries, that retrieve the same data?, what one do you think is better to use and why? taking into account standards, and better code etc. sorry if this is a stupid question, but im a curious cat! so here goes: QUERY 1: SELECT * FROM (( SELECT u.username, u.picture, m.id, m.user_note, m.reply_id, m.reply_name, m.dt FR...

std::map clear() performance in debugger?

The attached, trivial, test program tests the performance of emptying a simple std::map. Using MSVC 2008 and 2010, the debug build will take <30seconds when executed from a command prompt but almost 3 minutes when executed from within the debugger. The call to clear() is entirely responsible for the difference. If I break into the debugg...

PMI counters aggregation alghoritm

Hello The question is regarding logic that is hidden behind word "aggregate" in PMI documentation. From IBM WebSphere Developer Technical Journal: Writing PMI applications using the JMX interface " A module can have sub-modules and each module/sub-module will have related performance data (that is, metric or counter). For instance, th...

How does String.Contains work?

Possible Duplicate: What algorithm .Net use for searching a pattern in a string? I have a loop in my program that gets a line from a file. Then there is a check to whether the line contains a string if(line.Contains("String")) { //Do other stuff } There are over 2 million rows in the file so if I can quicken the speed b...

How can we keep OpenX from blocking page load?

We're using OpenX to serve ads on a number of sites. If the OpenX server has problems, however, it blocks page loads on these sites. I'd rather have the sites fail gracefully, i.e. load the pages without the ads and fill them in when they become available. We're using OpenX's single page call, and we're giving divs explicit size in CSS ...

Flex Pixel Blender Performance

I remember seeing some articles about using Pixel Blender to speed up performance on heavy computation, but i cant find them anymore. Can anyone suggest an article on this? ...

Fastest way to chop array in two pieces

I have an array, say: var arr1 = new [] { 1, 2, 3, 4, 5, 6 }; Now, when my array-size exceeds 5, I want to resize the current array to 3, and create a new array that contains the upper 3 values, so after this action: arr1 = new [] { 1, 2, 3 }; newArr = new [] { 4, 5, 6 }; What's the fastest way to do this? I guess I'll have to look...

Reporting Services is slow

OK, I have a report in Reporting Services 2005 backed by SQL Server 2005. I use some C# code to generate 10 records. Maybe 12 columns. There are only 6500 records in the table. I record those records to the database and then simply display them. So the Reporting Server isn't doing any calculations or anything intense that I can tell...

WPF Datagrid / Datatable: Large number of rows

I have a Datagrid connected to Datatable, which needs to load a very large amount of rows. To speed things up, I load 10% of the rows, and display the form. Most of the time the user only needs those 10% (they are the most recent entries). In a background thread I load the remaining 90% of the rows into another datatable (SecondData). ...

Strategies for checking ISNULL on varbinary fields?

In the past I've noted terrible performance when querying a varbinary(max) column. Understandable, but it also seems to happen when checking if it's null or not, and I was hoping the engine would instead take some shortcuts. select top 100 * from Files where Content is null I would suspect that it's slow because it's Needing to pul...

.Net LINQ query syntax vs method chain

Hy Is there any performance difference between: (from item in collection where item.id == 3 select item) and collection.Where(item => item.id ==3) In general is there any performance difference between the linq syntax and the method chain? ...

Detecting W3WP CPU issues using jetBrains dotTrace

Hi, Our W3WP process on our production server is constantly high. It doesn't max out at 100% but jumps up into the 90%s a fair bit. To help look into this I profiled the live aplication using JetBrains dotTrace. The results were as expected. All the slow methods were NHibernate functions that queried our database. My question is, would...