In Direct2D they recommend drawing similar things together, to avoid unnecessary GPU state changes. They also do some drawing operation reordering behind the scene just for that.
I have to draw a lot of rectangles which can have one of two colors. I'm thinking of doing the drawing in two passes, one for the rectangles with the first col...
the situation is that there are certain stored procedures and/or ad-hoc SQL that is causing our CPU to spike from 30 to 80% and dropping all our indexes out of memory, I'm wondering if there is a well established way to correlate the performance spikes (CPU, Disk Read, etc.) to particular instances of SP running..
...
I have an owner-drawn control where performance is an issue during quick repaints such as object drags, resizing and painting the selector square. i have noticed that several other apps, including Picasa, will temporarily draw a reduced-quality image during fast repaint scenarios and then update the image with a higher-quality version wh...
I always use a try catch when i am dealing with database related operations for eg.
try
{
DataContext.AddtoObjectname(obj);
DataContext.SaveChanges();
}
catch(Exception e)
{
throw new Exception("Problems adding object" + e);
}
But I read about try/catch affecting performance here -
http://stackoverflow.com/questions/1308432/do-try...
I have a simple query running on both .NET 3.5 and .NET 4, something like this:
var x = from o in Orders
join ot in OrderTypes on o.OrderTypeId equals ot.OrderTypeId
where or.OrderTypeName.Contains("sales")
select o;
var y = x.ToList();
The identical code runs on both .NET 3.5 and .NET 4, connecting to the same...
This NVIDIA video podcast (dated?) suggests bypassing OpenGL's matrix stack as a performance tip. It also suggets to bypass OpenGL's lighting, which implies that their intention is to actually transform the geometry manually. I happen to do this anyway for other reasons.
Ofcourse, it doesn't make sense that you'll actually benefit from ...
I've been running across a lot of Perl code that breaks long strings up this way:
my $string = "Hi, I am a very long and chatty string that just won't";
$string .= " quit. I'm going to keep going, and going, and going,";
$string .= " kind of like the Energizer bunny. What are you going to";
$string .= " do about it?";
From my backgr...
I'm curious. The scenario is a web app/site with e.g. 100's of concurrent connections and many (20?) page loads per second.
If the app needs to server a formatted string
string.Format("Hello, {0}", username);
Will the "Hello, {0}" be interned? Or would it only be interned with
string hello = "Hello, {0}";
string.Format(hello, userna...
I had asked this question in a much more long-winded way a few days ago, and the fact that I got no answers isn't surprising considering the length, so I figured I'd get more to the point.
I have to make a decision about what to display a user based on their assignment to a particular customer. The domain object looks like this vastly ...
a very cool article on how facebook breaks up their page into "pagelets" to maximize the work done by the server and browser when building a complex page that grabs various resources (ads, feeds, friends, etc). they call it bigpipe.
steve souders actually talked about this at one of his talks and he referred to it as "flushing the docu...
I see a lot of java code where android prefers to have developers use static inner classes. Particularly for patterns like the ViewHolder Pattern in custom ListAdapters.
I'm not sure what the differences are between static and non-static classes. I've read about it but it doesn't seem to make sense when concerned with performance or mem...
I want to be able to draw on to the top of a TextBlock, and have found a way to do this, but i cannot remove the drawing once it is there. Here is the code.
public class DerivedTextBlock : TextBlock {
public Boolean DrawExtra {
get { return (Boolean)GetValue(DrawExtraProperty); }
set { SetValue(DrawExtraPrope...
As described in http://stackoverflow.com/questions/449827/virtual-functions-and-performance-c virtual methods may have an impact on performance (extra lookup in vtable, no inlining, ...).
But I was wondering, could the use of virtual functions speed up the linking process?
Suppose that I have a class X, calling a method of class Y.
I...
I need to compare integers in a mysql table. Pretty simple, but this table is fairly large... so queries take a long time. No problem, I can use an index. According to MySQL documentation, I should be able to use an index for comparison operators:
"A B-tree index can be used for column comparisons in expressions that use the =, >, >=,...
Hi,
Well I'm having a hell of a time trying to get my CPU down under 45% when running my current application. I've tried all sorts of optimization tricks and tips with little success and I'm at a point now where I need a fundamentally
different approach.
Problem and Current Approach
In the main view of my application I have a single ...
I have a PHP script that runs on cron that can take up to an 15 minutes to execute. At regular intervals I have it spitting out memory_get_usage() so I can see what is happening. The first time it tells me my usage I am at 10 megs. When the script finishes I am at 114 megs!
Does PHP do it's garbage collection while the script is running...
I heard many times that postgres handles exists queries even faster then left join.
http://archives.postgresql.org/pgsql-performance/2002-12/msg00185.php
That's definitely true for one table aggregation.
But in our case their is more then one and the same query build with exists that make postgres to hang forever:
explain
SELECT coun...
I know there are mythical answers to this, but I am looking for something definitive. Why do windows machines always start off booting up quickly and performing nicely and then by a year later your boot time is ridiculously long and launching programs is much slower. Is is because of programs misbehaving (if so how do i find them), regis...
In one of my classes I have a number of methods that all draw values from the same dictionaries. However, if one of the methods tries to access a value that isn't there, it has to call another method to make the value associated with that key.
I currently have this implemented as follows, where findCrackDepth(tonnage) assigns a value to...
Hi everybody,
A theoretical question:
We all know about the pro's of minifying and combining javascript files in order to reduce HTTP requests to speed up a website. But when popular javascript libraries is used (jQuery for instance), it isn't too stupid to assume that these already have been downloaded to the clients computer from anot...