performance

Have you used Multi-Core for speed? What did you do and was it worth the effort?

So I did not look at the right location before posting this.. I was looking at the result of the computer language benchmark game: <http://shootout.alioth.debian.org/u32q/index.php&gt; And it seems that most of the fastest solutions are still C/C++ using just a single core of the 4 core machine that runs the tests. I was wondering i...

to database join or not to (move joins into application server?)

I am facing a performance (it can lead to scaling issue later on) issue at the moment. The application I am working on is quite complex and it’s running on SQL Server 2005, I need to join 6 - 7 tables to get the desired data. Each table contains more than 100,000 rows of data so far. The database schema can not be changed (must stay as i...

Java switch cases: with or without braces?

Consider the following two snippets, with braces: switch (var) { case FOO: { x = x + 1; break; } case BAR: { y = y + 1; break; } } Without braces: switch (var) { case FOO: x = x + 1; break; case BAR: y = y + 1; break; } I know that, in the snippet with braces, a new scope is created...

TKProf Output: SQL*Net message from client

Hi all, I am currently in the process of debugging a database performance issue. I have run extended trace on the suffering oracle box to obtain a trace file which I have analyzed using tkprof. One thing that caught my eye straight away was the following output; Elapsed times include waiting on following events: Event waited on ...

Performance counters on the iPhone

I'm trying to find the best method of incode performance monitoring on the iPhone. On a windows platform I would use the following functions : QueryPerformanceCounter((LARGE_INTEGER *)&ctr); QueryPerformanceFrequency((LARGE_INTEGER *)&freq); Does anything like this exist on the iPhone? Whats the highest resolution I can time something...

What is a good tool or site to use to performance test a web page/site?

What is a good tool or site to use to performance test a web page/site? I am trying to find a good baseline to detect how fast my page will load on one hosting provider vs another. I initially used http://www.freespeedtest.com/ but like to get opinions and links for others. ...

What are the theoretical performance limits on web servers?

In a currently deployed web server, what are the typical limits on its performance? I believe a meaningful answer would be one of 100, 1,000, 10,000, 100,000 or 1,000,000 requests/second, but which is true today? Which was true 5 years ago? Which might we expect in 5 years? (ie, how do trends in bandwidth, disk performance, CPU perform...

What tool can I use to find out what JavaScript events are being called when leaving a web page?

I have a set of pages that have tons of JavaScript on it: Table sorting, AJAX calls, autocomplete, dynamically hiding and displaying areas of the page, etc... The problem that I am seeing is when the data on said page gets large a delay (browser freezes) is noticed when leaving the page. This delay happens when the user clicks away, clos...

SQL not equals & null

We'd like to write this query: select * from table where col1 != 'blah' and col2 = 'something' We want the query to include rows where col1 is null (and col2 = 'something'). Currently the query won't do this for the rows where col1 is null. Is the below query the best and fastest way? select * from table where (col1 != 'blah' or ...

Which of these cross-browser Javascript functions performs better?

As a rule of thumb, which of these methods of writing cross-browser Javascript functions will perform better? Method 1 function MyFunction() { if (document.browserSpecificProperty) doSomethingWith(document.browserSpecificProperty); else doSomethingWith(document.someOtherProperty); } Method 2 var MyFunction; if...

Write-Once + Read-Numerous Map in Java?

Hi guys, I have a requirement that a Map will be constructed with up to 50~200 entries (it could be more, let's call it not-too-little anyway). The writing is only done once and the reading (using Map.get("keyName")) can go more than 20 per request (it's a webapp). I'm going for Hashmap currently as it (I suppose) gives me the most opt...

Profiling C++ multi-threaded applications

Have you used any profiling tool like Intel Vtune analyzer? What are your recommendations for a C++ multi threaded application on Linux and windows? I am primarily interested in cache misses, memory usage, memory leaks and CPU usage. I use valgrind (only on UNIX), but mainly for finding memory errors and leaks. ...

Any name for this concept?

Say, we have a program that gets user input or any other unpredictable events at arbitrary moments of time. For each kind of event the program should perform some computation or access a resource, which is reasonably time-consuming to be considered. The program should output a result as fast as possible. If next events arrive, it might ...

Performance issues when updating UI without checking InvokeRequired first?

I have gotten a bit lazy(it's sometimes good) and started updating WinForms UI by invoking a callback without checking InvokeRequired first. Are there a performance issues or considerations that I should be aware of? private delegate void SetStatusEventHandler(string statusMessage); private void SetStatus(string statusMessage) ...

Is there a way to see how much CPU usage per core a process is using?

I know in perfmon you can see how much each core is utilized, and how much total CPU a particular process is using. However I can't seem to find a way to see how much CPU a process is using broken down by cores. Is there a built-in way to see this information? Is there a programmatic way to see this? (C# preferred) Am I demonstrati...

How to use multiple threads to process an image in sections?

I am trying to quickly process large images (about 2000x2000). I am using a TrackBar to change the overall brightness of an image. The problem is that the TrackBar (as you all know) can be moved very quickly. This is ok as I do not need to process the image for every tick of the TrackBar, but it does need to be reasonably responsive. ...

Tackling alpha blend in OpenGL for better performance

Since having blends is hitting perfomance of our game, we tried several blending strategies for creating the "illusion" of blending. One of them is drawing a sprite every odd frame, resulting in the sprite being visible half of the time. The effect is quit good. (You'd need a proper frame rate by the way, else your sprite would be notice...

Hibernate Query runs slow in the system, but fast when run directly.

I have a problem similar to the on in this weeks podcast. We have a Java application using hibernate with Sql Server 2005. Hibernate is generating a Query for us that is taking nearly 20 minutes to complete. If we take the same query using show_sql and replace the questions marks with constant value the answer is returned immediately....

How can I retrieve a JDBC ResultSet as an ArrayList?

I'm doing a query to retrieve a large amount of IDs (integers). Instead of iterating millions of times through the ResultSet and copying everything one-by-one to an ArrayList, is there some way to simply retrieve everything as an ArrayList? I understand that ResultSet is supposed to be iterated because the underlying implementation may ...

Does the order of columns in a WHERE clause matter?

Hi, Does the order of the columns in a WHERE clause effect performance? e.g. Say I put a column that has a higher potential for uniqueness first or visa versa? ...