performance

Python: Do (explicit) string parameters hurt performance?

Suppose some function that always gets some parameter s that it does not use. def someFunc(s): # do something _not_ using s, for example a=1 now consider this call someFunc("the unused string") which gives a string as a parameter that is not built during runtime but compiled straight into the binary (hope thats right). The que...

How to speed up mssql_connect() in PHP 5.2.X

Hello folks, I'm working on a project where a PHP dialog system is communicating with a Microsoft SQL Server 2008 and I need more speed on the PHP side. After profiling my PHP scripts, I discovered that a call to mssql_connect() needs about 200 milliseconds on that particular system. For some simple dialogs this is about 60% of the who...

JMeter - Access Log Sampler setting a default app. name

hi, i'm trying to achieve the following: i want to use a tomcat accesslog file and load it into jmeter and run it. The problem i run into is that for example a accesslog line looks like this: "GET /MyApp/... HTTP/1.1" What i need is to be able to change the applications name (MyApp). I did not find anything usefull if this is possibl...

How many div tags are too much?

How many div tags in one HTML document would one need before it affects performance? In this case, the tags are not nested and the content within each is minimal (background color/image). This question is a follow-up on a previous question; http://stackoverflow.com/questions/2281859/drawing-lines-with-clickable-points-using-javascript ...

How can I improve Silverlight binding performance?

Scenario: I have many (potentially dozens) of ObservableCollection's being bound to ListBoxes at load time. These bindings are declared in their respective Xaml files. When the app first runs, it queries a database and then populates these ObservableCollections (by adding a new entity to their respective collection). I suspect that the...

co-located CORBA call optimization for performance

I am working with a CORBA based system which originally was designed to run on multiple servers. If I wanted to co-locate the CORBA services so that the calls are happening across process boundaries but not across machines, are there any optimization settings which can be set to let the ORB know this is happening? For example, is it po...

Huge page buffer vs. multiple simultaneous processes

One of our customer has a 35 Gb database with average active connections count about 70-80. Some tables in database have more than 10M records per table. Now they have bought new server: 4 * 6 Core = 24 Cores CPU, 48 Gb RAM, 2 RAID controllers 256 Mb cache, with 8 SAS 15K HDD on each. 64bit OS. I'm wondering, what would be a fastest c...

What are these sys.sp_* Stored Procedures doing?

I'm tracking down an odd and massive performance problem in my SQL server installation. On my system, a particular stored procedure takes 2 minutes to execute; on a colleague's system it takes less than 1 second. We have similar databases/data and configurations, but there's obviously something very different. I ran the SP in question t...

Getting ETags right

I've been reading this book (highly recommended): And I have a particular question about the ETag chapter. The author says that ETags might harm performance and that you must tune them finely or disable them completely. I understand the risks, but is it that hard to get ETags right? I've just made an application that sends an ETag ...

How to reduce the amount of memory consumed by .NET apps?

This question escaped my mind last night, but I remember it again. Is it possible that in the development of a vb.net application that you can reduce the amount of memory that it will consume once you deploy it. We are making a simple system that we will deploy in a small company (for free) but we don't know if the computer hardware in ...

How do I limit RAM to test low memory situations?

I'm trying to reproduce a bug that seems to appear when a user is using up a bunch of RAM. What's the best way to either limit the available RAM the computer can use, or fill most of it up? I'd prefer to do this without physically removing memory and without running a bunch of arbitrary, memory-intensive programs (ie, Photoshop, Quake,...

Why is this jQuery selector so slow?

Based on testing a page with ~220 elements, of which ~200 are checkbox elements, and each element has to query an array with ~200 items, I was surprised to discover that input selector: $("input[id$='" + code + "']").each(function() { //... is approximately 4-5 times faster than $("input:checkbox[id$='" + code + "']").each(function(...

Fastest way to get maximum value from an exclusive Range in ruby

Ok, so say you have a really big Range in ruby. I want to find a way to get the max value in the Range. The Range is exclusive (defined with three dots) meaning that it does not include the end object in it's results. It could be made up of Integer, String, Time, or really any object that responds to #<=> and #succ. (which are the only ...

Is there a performance testing tool for dll's? (not for source code)

I know red-gate's ANTS Performance Profiler but it works with source code. I have an ASP.NET web application that is deployed on a remote server. I'm going to test its performance while it is working on the server. My main goal is to detect what method of what class is slow and then is a bottleneck. Is there a way or a tool? ...

Which is quicker COALESCE OR ISNULL ?

I understand the difference between these functions but my question is when checking for a single null value would ISNULL be any quicker than using COALESCE? e.g COALESCE(SELECT TOP 1 SomeValue FROM SomeTable, 0) vs ISNULL(SELECT TOP 1 SomeValue FROM SomeTable, 0) ...

How to find out what SQL queries are being blocked and what's blocking them?

I'm trying to optimize some slow web pages, and my guess is that the problem has to do with SQL blocking (doesn't seem to be a matter of CPU or I/O utilization on the web server or database server). What's the quickest way to find out what queries are getting blocked and what queries are doing the blocking? ...

What is the fastest way to write to a text file from a database table?

Hi, I have data analysis application and I need to be able to export database tables to a delimited text file using c#. Because of the application architecture, that data must be brought to the c# application. No database exporting functionality can be used. The tables size can range from a few columns and a few hundred rows to ~100 co...

Creating thumbnail of all the images inside a folder

I was trying to generate thumbnails using Bitmap.GetThumbnailImage() function for 20+ images in a folder. I could see huge memory spike by the application when it does the following procedure (about 600,000K in Task Manager mem usage). foreach (var image in ListOfImages) { var thumbnailFolder = @"\thumb"; var thumbnailFile = th...

Performance - Int vs Char(3)

I have a table and am debating between 2 different ways to store information. It has a structure like so int id int FK_id varchar(50) info1 varchar(50) info2 varchar(50) info3 int forTable or char(3) forTable The FK_id can be a foreign key to one of 6 tables so I need another field to determine which ...

MySQL linking two tables without third table holding the relationship

Hi guys, say you have two tables table_a f1 <- PKEY f2 f3... table_b b1 <- PKEY b2 b3... now say table_a had a MANY to MANY relationship with table_b normally you'd have a third table to hold that relationship table_c c1 <- PKEY b1 <- PKEY of table_b f1 <- PKEY of table_a also say b1 + f1 for whatever reason could not be the ...