performance-tuning

Shark & MallocDebug for iPhone Applications

I'm trying to optimize an iPhone game that I am developing which uses the Cocos2D-iphone framework. I want to use Shark to measure performance but "Run->Start with Performance Tool->Shark" is disabled in XCode (Instruments Leaks works fine). I've configured the build to "Generate Profiling Code", tried building for both the device and t...

Find performance bottleneck in a method

I have a specific problem with a bottleneck in my code that I would like to iron out, but I would like to know generally, for the future, how I would go about finding quickly where a bottleneck occurs without having to re-invent the wheel. Here is my method's code but like I said, I'd like to know how to generally find out how long the ...

Uploading files in WCF services approaches

I have WCF service that I can upload files. XElement upload = service.UploadFiles(id, File.ReadAllBytes(filePath)); This works, but I am just wondering if it is the best way to upload each of them one by one when you have many (about a thousand) small files (15~20K). How can we compare "Chunky" versus "Chatty" approaches? 1) Is it be...

How to store language tag IDs in databases, as smallint or varchar?

I'm wondering about how to store language tag IDs (e.g. en-US). A quick example: Table l10n ( l10n_id SMALLINT, code VARCHAR(5) ) PK: l10n_id Index on code Table product ( product_id INT, ..language-neutral columns.. ) PK: product_id Table product_l10n ( product_id INT, l10n_id SMALLINT, ..language-specific columns....

Index Tuning for SSIS tasks

I am loading tables in my warehouse using SSIS. Since my SSIS is slow, it seemed like a great idea to build indexes on the tables. There are no primary keys (and therefore, foreign keys), indexes (clustered or otherwise), constraints, on this warehouse. In other words, it is 100% efficiency free. We are going to put indexes based on ...

Do try/catch blocks hurt performance when exceptions are not thrown?

During a code review with a Microsoft employee we came across a large section of code inside a try{} block. She and an IT representative suggested this can have effects on performance of the code. In fact, they suggested most of the code should be outside of try/catch blocks, and that only important sections should be checked. The Micros...

Performance testing for existing web app - Useful tools?

I'm maintaining a web app that has performance problems. I want to record a series of actions, then play back those actions once I've made changes and compare page load times so that I can quantify the performance improvement. The Selenium IDE does what I need for recording and playing back the actions, but I haven't found an easy way ...

Performance Tuning

How can i check the Query running from long time & steps of tuning the query? (Oracle) ...

Delete a LINQ to SQL record without loading it first

Is it possible to get LINQ to SQL to delete a record using the PK, without loading the record first? Similar to NHibernate's proxy object functionality? ...

Debugging tools for performance of web application

I have a web application developed in ASP.NET 2.0 ,deployed in a dedicated server.Now my pages taking long time to load.I want to debug the root cause.I have checked the code level performance bookmarks and nothing found wrong there.Is there any tools to debug this ? Some thing like analyzing the execution plan of an sql query in sql ser...

How do you gather statistics from SQL Server?

sys.dm_exec_query_stats seems to be a very useful function to gather statistics from your database which you can use as a starting point to find queries which need to be optimized. selecting * gives somewhat cryptic results, how do you make the results readable? What type of queries do you get from it? Are there other functions or querie...

Deserializing data from file. Performance issue

I read a table with more than 1 million records from a database. It takes 3 minutes until I have a populated object in memory. I wanted to optimize this process, and serialized this object to a file using binary BinaryFormatter. It created a file with 1/2 GB size. After I deserialized this file back to memory object. This took 11 minutes...

Is a globally partitioned index better (faster) than a non-partitioned index?

I'm interested to find out if there is a performance benefit to partitioning a numeric column that is often the target of a query. Currently I have a materialized view that contains ~50 million records. When using a regular b-tree index and searching by this numeric column I get a cost of 7 and query results in about 0.8 seconds (with no...

iPhone SDK - How do you make a UIView that responds to audio input?

I am developing an app that uses Core Graphics and Audio Queue Services to generate an image that changes with the input from the iPhone's mic.  Some sort of interaction between Core Graphics and Audio Queue Services is killing my frame rate, keeping it at about 10 fps no matter what I do.  Profiling with Instruments tells me that my pro...

Performance difference when running app in iPhone simulator from XCode and when starting in Simulator directly

Hi, I have some strange performance differences when I run an iPhone application on the simulator a) from XCode and b) directly in the simulator. One method which calculates some stats from all objects in my Core Data DB takes less then one second when I run it directly in the simulator and it takes 22 seconds when I start the applica...

Does removing comments improve code performance? JavaScript.

Hi, Does removing comments from JavaScript code improve performance? I realize that this is not great programing practice as comments form an intrinsic part of development. I am just interested to know if they do in fact add some overhead during compilation. Thanks, Ron. ...

Android Draw Time

Whats a Good Draw Time? Im getting around 30-35 MS when i look at it in HeirchyViewer ...

When can I host IIS and SQL Server on the same machine?

I've read that it's unwise to install SQL Server and IIS on the same machine, but I haven't seen any evidence for that. Has anybody tried this, and if so, what were the results? At what point is it necessary to separate them? Is any tuning necessary? I'm concerned specifically with IIS7 and SQL Server 2008. If somebody can provide numb...

Ordering table in join : SQL Tuning

I having a query with 10 tables joined. Do i need to follow any order in writing the sql joins? Suppose if table-1 has 1000 records, table-2 has 900 records and so on So do i need to write the join for the table has higher number of records and followed by lower number of records? so that we improve the performance of sql. ...

Tuning Rows-to-Cols Query

The following query (V_TITRATION_RESULTS) is a view uses a row-to-column pivot which returns about 20,000 rows: SELECT test.created_on as "Created On", r_titr as "Titrator", r_fact as "Factor" FROM (SELECT test_id, MAX(CASE WHEN result_tmpl_id = 2484 THEN result END) r_titr, MAX(CASE WH...