performance

MSXML2.XMLHTTP - Vista performance

Hi all, I have the following (simple) VB6 code: Dim xmlDoc As MSXML2.DOMDocument30 Set xmlDoc = New MSXML2.DOMDocument30 Dim xmlRequest As MSXML2.XMLHTTP40 Set xmlRequest = New MSXML2.XMLHTTP40 xmlRequest.open "GET", "http://myserver.com/Service.svc/models/20080101", False xmlRequest.setRequestHeader "Accept-Encoding:", "gzip/deflate...

Aren't modern computers powerful enough to handle Strings without needing to use Symbols (in Ruby)

Every text I've read about Ruby symbols talks about the efficiency of symbols over strings. But, this isn't the 1970s. My computer can handle a little bit of extra garbage collection. Am I wrong? I have the latest and greatest Pentium dual core processor and 4 gigs of RAM. I think that should be enough to handle some Strings. ...

How efficient are IFrames?

If I built a page that consisted of IFrames on the order of hundreds, would this be incredibly slow, or would it behave similar to having a hundred divs? The reason I ask is I'm looking for a nice recursive way to build a web page, where I can load sub-elements of a page as if they were complete pages of their own, with their own urls. ...

Is it faster to search for a large string in a DB by its hashcode?

If I need to retrieve a large string from a DB, Is it faster to search for it using the string itself or would I gain by hashing the string and storing the hash in the DB as well and then search based on that? If yes what hash algorithm should I use (security is not an issue, I am looking for performance) If it matters: I am using C# a...

What is the relation between merges and number of items in a in k-way merge

The question is: In a k-way merge, how many merge operation will we perform. For example: 2-way merge:2 nodes 1 merge; 3 nodes 2 merge; 4 nodes 3 merge. So we get M(n)=n-1. What the the M(n) when k is arbitrary? ...

Ruby symbols are not garbage collected!? Then, isn't it better to use a String?

If you create 10,000 strings in a loop, a lot of garbage collection has to take place which uses up a lot of resources. If you do the same thing with symbols, you create objects which cannot be garbage collected. Which is worse? ...

How to manage a CPU intensive process on a server

I need to run a CPU- and memory-heavy Python script (analyzing and altering a lengthy WAV file) as a background process on my web server (a VPS), between HTTP requests. The script takes up to 20 seconds to run and I am concerned about the performance on my server. Is there a good approach to either lower the priority of the process, per...

How to track IIS server performance

I have a reoccurring issue where a customer calls up and complains that the web site is too slow. Specifically, if they are inactive for a short period of time, then go back to the site, there will be a minute-two minute delay before the user sees a response. (the standard browser is Firefox in this case) I have Perfmon up and running,...

Micromanagement of your time on support (talking with marketing people)

I'm in a bit of a sticky situation and was hoping some of you coders faced something similar. I'm a system administrator for a certain software at a company. Due to stupid arrangement, I'm technically under the Marketing department with no affiliation to the IT help desk. Only reason this is important is that its difficult for me to exp...

SQL Server - Individual Procedures vs. Single Procedure

Hi, In a system I'm developing I have a choice of either using a single stored procedure that does three related jobs and returns either no result, or the same result set, but sourced from two different tables. I read an article yesterday that suggested that a stored-procedure should only have one execution plan and that any procedure ...

Why does ASP.NET re-compile (re-JIT) everything when only one thing changes?

I have an ASP.NET 2.0 application (installed on IIS 6.0 from an MSI) which was compiled as a "web site", and precompiled/packaged using a web deployment project, in Visual Studio 2005. (I have put in a request to the developers to consider changing to a web application for the next version, but it won't change for this version). Whenev...

Performance benefit of variable declerations in VBA?

Is there a performance benefit of having variables dimensioned in the beginning of a function verses having them declared just before they are used? I am using VBA in MS Access 2003. Example, Function f(y As Long) As Long Dim x As Long If y <> 0 Then x = 1000000 End If End Function Verses Function f(...

How can I preload web app classes in the JVM on start up?

In our web apps the first load of some pages takes a small but noticeable extra about of time due to class loading. Does anyone have any clever ways of preloading web app classes in the JVM on start up? Update: What we do now is store a bunch (700) of full class names in a db table. We read the table at startup and do Class.forName()...

Scalable Database Tagging Schema

EDIT: To people building tagging systems. Don't read this. It is not what you are looking for. I asked this when I wasn't aware that RDBMS all have their own optimization methods, just use a simple many to many scheme. I have a posting system that has millions of posts. Each post can have an infinite number of tags associated with it. ...

What is the LINQ to objects 'where' clause doing behind the scenes?

I've just replaced this piece of code: foreach( var source in m_sources ) { if( !source.IsExhausted ) { .... } } with this one: foreach( var source in m_sources.Where( src => !src.IsExhausted ) ) { ... } Now the code looks better (to me) but I'm wondering what's really happening here. I'm concerned about perf...

SQL IN clause slower than individual queries

I'm using Hibernate's JPA implementation with MySQL 5.0.67. MySQL is configured to use InnoDB. In performing a JPA query (which is translated to SQL), I've discovered that using the IN clause is slower than performing individual queries. Example: SELECT p FROM Person p WHERE p.name IN ('Joe', 'Jane', 'Bob', 'Alice') is slower than fo...

Any contraindication of using Stored Procedures performing SELECT, UPDATE, INSTERT...

I'm using one SP performing all CRUD operations So, basically I'm executing same SP depending what action necesary: eg -- for select exec USP_ORDER @MODE='S', @ORDER_DATE='2009/01/01' -- for update exec USP_ORDER @MODE='U', @other_params -- for insert exec USP_ORDER @MODE='I', @other_params -- for delete exec USP_ORDER @MODE='D', @ID=1...

Performance issues with empty ";" statement in C#

Platform: .NET Framework 3.5 SP1 on x32 Are there any performance issues regarding leaving an empty statement (";", by itself) in code? And to be marked as an answer would you also teach a man (me? and other people reading this) to fish? Meaning, how to figure out there is a performance issue with it? ...

Does SQL Server cache LINQ to SQL queries?

As far as I know, in MS SQL Server 2000+ stored procedures are compiled, and run faster than normal non-compiled queries. I wonder if MS SQL Server also compiles LINQ to SQL queries, and caches that compilation, for performance purposes. ...

What is a reliable way to calculate actual (web) page loadtime

I'm interested in knowing the actual average page loadtime for my webapplication. Simplistically, how log does my average visitor wait before they can start using a page on my site. From when they click the link to my site until the site is finished rendering & ready to accept input. The standard solution seems to be to use Javascript...