performance

Are there rendering performance differences between using ScaleTransform and setting the size directly?

As far as rendering performance is concerned, has a Rectangle with a size of 5000x5000 different performance characteristics than a Rectangle with a size of 5x5 and a ScaleTransform (LayoutTransform) of 1000? ...

MySQL UPDATE query with subquery taking forever

Hi, I have a MySQL UPDATE query which takes a long time to complete. Am I missing a much simpler way to achieve the same result? "UPDATE table2, table1 SET table2.id_occurrences = (SELECT SUM(IF(id = table2.id, 1, 0)) FROM table1) WHERE table2.id = table1.id;" table2 contains all possible values of id, exactly one record for each. t...

Add large chunk of HTML with Jquery

Hi. I am designing a site that uses progressive enhancement and has also has a mobile version. I am wanting to use jquery to add a slideshow to the desktop site and want to know the best method for adding a large quantity of HTML. A sample of what I intend to add is: <!-- Slideshow --> <div class="scrollable"> <!-- "previous page" actio...

Which is faster/better for caching, File System or Memcached?

I don't think it's clear to me yet, is it faster to read things from a file or from memcached? Why? ...

Does unused database hurt MySQL server performance in any way?

If there are some unused databases on MySQL server is it better to remove those from server? ...

sql performance, visual studio

Hi there I'm using linq2sql and .net 3.5 with vs2010. I'm experiencing bad sql performance when i run my program through vs2010, but not when i execute the same debug enabled exe outside vs. Whats going on here? Any ideas? ...

Are there any cases where LINQ's .Where() will be faster than O(N)?

Hi all.. Think the title describes my thoughts pretty well :) I've seen a lot of people lately that swear to LINQ, and while I also believe it's awesome, I also think you shouldn't be confused about the fact that on most (all?) IEnumerable types, it's performance is not that great. Am I wrong in thinking this? Especially queries where ...

Does a begin-end block affect the performance of a conditional statement?

I am working with Delphi. Does it make any difference in performance if we write if condition in different ways? For example: if (condition) then someVar := someVal else someVar := someOtherVal; Or we can write: if (condition) then begin someVar := someVal; end else begin someVar := someOtherVal; end; I prefer the s...

Using MS Ajax Minfier 4.0 for Asp.Net MVC 2.0?

I am planning to use MS Ajax Minifier with Asp.Net MVC 2.0 for handling the Js and Css files. Does anyone has experience with MS Ajax Minifier? I have following questions regarding this. Is it the best way to use JS/CSS files in Asp.Net MVC or is there a better way. E.g. YUI Compressor, Telerik Extension for MVC? As I understand we ca...

Alternatives for Pushing data from an Android Service to an Activity

I've a service that is receiving UDP data from the network. I want to push this data from the service to a UI activity. One way to do it is using broadcast Intents. What is the performance overhead of sending broadcasts frequently from the service to the activities? Are there any other alternatives for doing this ? Thanks. ...

Query Optimization

Hi folks, i'm having problem with a query generated by mondrian OLAP Server . it's taking too long. the query look like as follows. select "TABLE1"."column0" as "c0" from "FACT_TABLE" as "FACT_TABLE", "TABLE7" as "TABLE7", "TABLE6" as "TABLE6", "TABLE5" as "TABLE5", "TABLE4" as "TABLE4", "TABLE4" as "TABLE3", "TABLE2" as "TABLE2", "TA...

How can I force SQL Server to use more CPU

Hello, I have an data transformation query which takes a long time to run on my development machine (Core i7 920 running at 3.9GHz, and with 12GB of RAM under Windows Server 2003 x86 and with 2 Velociraptors 300GB iN RAID0). When I look at the task manager, the CPU stays around 26%, with the third (out of 4) core being the most active....

C# - Organized object access with performance in mind

Uhm, so I had problems with the title, but this was my best shot! Situation: I am writing a library so that I easily can re-use my code in future projects, without thinking about the internals. This library is supposed to be able to create objects at runtime and then access them to do tasks via a method. All by using a easy-to-use ident...

Yet another Dynamic Array vs. std::vector, but...

...well, I got strange results! I was curious about the performance of std::vector vs. that of a dynamic array. Seeing as there are many questions on this subject already, I wouldn't have mentioned it if I didn't constantly get these 'contradictory' results: vector<int> is somehow faster than a new int[]! I always thought that if there ...

Eventmachine / Em-http-request / SQL throughput and architecture

I'm trying to create some code to process the twitter spritzer stream, and from the advice I'd found it seem like using ruby's eventmachine/em-http-request is a good way to do it. The basic code is below, and I'm getting ok performance, but I don't believe its able to keep up with the stream (despite running on a fairly well spec'd AWS ...

Please will you help tune a 7-table-join mysql count query where tables contain 30,000+ rows?

I have an sql query that counts the number of results for a complex query. The actual select query is very fast when limiting to 20 results, but the count version takes about 4.5 seconds on my current tables after lots of optimizing. If I remove the two joins and where clauses on site tags and gallery tags, the query performs at 1.5 sec...

Which is better for showing lots of small values in ASP.Net MVC - HTML helper or partial view

We have a small Asp.Net MVC project which displays a report of several tens or hundreds of rows of data. Each row is represented by an object on the view models. Currently we are showing the rows like this: <table> <tr style="text-align:center"> <th>Name</th> <th>Item count</th> <th>Stat 1</th> <th>St...

De Facto Reference for Algorithm Performances?

A common theme I'm seeing in my courses are worst/best case performances for trees, hash tables, equations such as log n. I'm wondering if there's a de facto place where people refer to find this sort of information (textbook, online, etc) besides Wikipedia. I'm hoping to find something that mathematically breaks down such algorithms/dat...

LINQ Count .. best method

My company has just started using LINQ and I still am having a little trouble with the abstractness (if thats a word) of the LINQ command and the SQL, my question is Dim query = (From o In data.Addresses _ Select o.Name).Count In the above in my mind, the SQL is returning all rows and the does a count on the numb...

Overhead of times() system call - relative to file operations

What is the relative overhead of calling times() versus file operations like reading a line fread(). I realize this likely differs from OS to OS and depends on how long the line is, where the file is located, if it's really a pipe that's blocked (it's not), etc. Most likely the file is not local but is on a mounted NFS drive somewhere ...