performance

iphone app sporadically hangs for a few seconds

When I run my Iphone app on my Ipod touch, it runs fine most of the time. But every so often, it will hang for a short while -- anywhere from 5 to 15 seconds. After the hang, it resumes running normally. The strange thing is that to all appearances, the app's demands on the system should be fairly steady. It is doing a lot of draggin...

Custom Formatting before Save Wordpress

Hey all, I was wondering if there was a method to do some of my own custom formatting before the post is saved to the database. I know how to customize it when its fetched, but I'd rather keep the reading performance high over the write performance. Thanks, Matt ...

Getting Django Query Count While in manage.py shell

Is there a way to count my queries during a manage.py shell session? It would be helpful as a means to inspect some of the ORM behavior between queries. Additionally, it would be nice to pull the queries themselves, and I guess their execution times while I'm at it. i.e. >>>from myapp.models import User >>>User.objects.filter(...

Getting Framerate Performance on iPhone

I've just come off the PSP where performance testing was easy. You just turned off 'vsync' and printed out the frameratem, then change something and see whether the frame rate goes up or down... Is there any way to do the same thing on the iPhone? How do you turn vsync off? The Instruments tool is next to useless. Its chief problem bein...

Is There any Performance Difference in the Ways of Writing a jQuery Plugin?

I'm curious, what are the (performance) differences in the ways that you can write a jQuery plugin, if any? I've seen it done a couple of ways: 1. Using $.extend(): (function($){ $.fn.extend({ newPlugin: function(){ return this.each(function(){ }); } }); })(jQuery); 2. Your own function: (function($){ $.f...

Taking a screenshot without screen freeze. C# and WindowsXP

I am using C# .NET to take a screenshot of the contents of a second monitor and display it in a windows on the primary screen. The code I have is: screenShotGraphics.CopyFromScreen( Screen.AllScreens[screen].Bounds.X, Screen.AllScreens[screen].Bounds.Y, 0, 0, Screen.AllScreens[screen].Bounds.Size, CopyPixelOpera...

Why does appending "" to a String save memory?

I used a variable with a lot of data in it, say String data. I wanted to use a small part of this string in the following way: this.smallpart = data.substring(12,18); After some hours of debugging (with a memory visualizer) I found out that the objects field smallpart remembered all the data from data, although it only contained the s...

Is it faster to access data from files or a database server?

If I have a static database consisting of folders and files, would access and manipulation be faster than SQL server type databases, considering this would be used in a CGI script? When working with files and folders, what are the tricks to better performance? ...

Python: Rar Brute Forcer

Hello, I am trying to brute force a RAR archive which is protected by a password with 3 characters: import os Alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" for a in range(0,26): for b in range(0,26): for c in range(0,26): Brute = Alphabets[a] + Alphabets[b] + Alphabets[c] os.popen4("Rar.exe x -p" + Brute + " Protected.rar") # raw...

resharper 4.5 making VS2008 very slow especially with ASPX pages

Hi, I am using Visual studio 2008 with Resharper 4.5 add-in. the Visual studio performs well on its own, but when I add resharper it slows down and VS freezes for a while every time I type and save the code. the performance is even worse when I am typing and saving aspx files (mark-up or javascript). the solution has around 35 projects...

Best way to comparing perormance of different version of library

Hi Currently for each call in library,I am doing multiple iteration , Measuring time taken for each call and then calculating : Average time taken for each call Min time take Max time taken Standard Deviation But it seems its not a good method . As these time depends upon state of machine ,As if CPU is busy with other process res...

Do php 5 try catches affect performance when no exception is caught?

Someone extremely smart at work told me try catches which don't throw will affect performance on a site with millions of users. based on the unit test posted showing equal performance, I'm wondering if this is related to an os level and/or web server specific situation. For instance, web server's implementation of asynchronous work occur...

Performance of bcp/BULK INSERT vs. Table-Valued Parameters

I'm about to have to rewrite some rather old code using SQL Server's BULK INSERT command because the schema has changed, and it occurred to me that maybe I should think about switching to a stored procedure with a TVP instead, but I'm wondering what effect it might have on performance. Some background information that might help explain...

Matlab GPU acceleration for loading large point cloud dataset

I'm trying to load a large dataset of a million points in 3d space in MATLAB, but whenever I try to plot it (scatter or plot3) , it takes forever. This is on a laptop with Intel Graphics Media Accelerator 950, up to 224-MB shared system memory. This also sometimes leads to Matlab 2008a crashing. Is there a way to let MATLAB use a Nvidia ...

What are the biggest factors for disk write speed?

I am doing some performance tests for the amount of time it takes to write X amount of files to a specified location. I will be comparing write speeds: 1) with a custom file system driver installed and loaded, and 2) with the file system driver not installed nor loaded. I want to test this on various machines with various OS's. Also, I ...

Consequences to setting the db compatibility level to SQL Server 2000

We have a Sql Server 2005 DB. For whatever reason, the compatibility level (e.g. via sp_dbcmptlevel) is set to 80 (which is Sql Server 2000). What are the consequences of that? Is there a performance penalty for my apps because of it? ...

NHibernate select grows exponentially slow

My problem is that NHibernate gets exponentially slow when fetching records from the database. I had a request to basically pull all the data from a very large database to be used in a report. I figured, well since I can't get all the records in one shot because the recordset is so large, i thought try breaking it up. Basically I'm ite...

How should I store a large amout of text data in memory?

I am working on a c parser and wondering how expert manage large amount of text / string (> 100mb) to store in memory? the content is expected to be accessible all the time in fast pace. bg: redhat / gcc / libc a single char array would be out of boundary causing segmentation fault... any idea or experience is welcomed to share / dis...

WinForms performance mystery: derived PictureBox control slower than the original?

In my .NET 2.0 project, I made an empty derived class of System.Windows.Forms.PictureBox: public class NewPictureBox : PictureBox { //absolutely nothing } Then I did the following: set both the derived control's and the base control's Image property to a rather large image (800x600), SizeMode is Normal (only the upper-left port...

How to Create Stable and Fast Asp.net Custom Control

Hi Experts, I need to create an Asp.net Calendar Control with Daily-weekly-Monthly & Yearly view This Control should Have Some Events , Properties and some Methods as its clear. This Control should be capable to add tasks ( jobs) and some photos in each day Also Should have Remainder and should be Full Ajaxable. So As I'm not familiar ...