performance

Performance: selector or traversing?

Hi everyone, I was wondering which was the fastest way to apply a class on body and, let's say, all paragraphs. We can use simple selectors such as: $("body").addClass("foo"); $("p").addClass("bar"); But also traversing methods like: $("body").addClass("foo").find("p").addClass("bar"); Is there any difference in term of performanc...

ASP.NET web site: Delay in page load

I have a web application developed in ASP.NET 2.0 ,deployed in a data center.The application is a media portal with CMS. The application is hosted in Windows server 2008 and the database is SQL server 2005 in Windows 2003 server. I have home page with numerous links to sub pages or articles.When i click on any of the links in home page...

How to Change All Sql Columns of One DataType into Another

I have a database (Sql Server 2005) where there are dozens of tables, each of which has a number of columns (on average 10-20) with datatype set to nvarchar(max). This is absolutely killing performance (some of these columns are being used for joins and some of the tables have 100K+ rows). I would like to change all of these columns to b...

Performance of Aggregate Functions on Large Infrequently Changing Datasets

I need to extract some management information (MI) from data which is updated in overnight batches. I will be using aggregate functions to generate the MI from tables with hundreds of thousands and potentially millions of rows. The information will be displayed on a web page. The critical factor here is the efficiency of SQL Server's han...

SQL Profiler and Tuning Advisor

We are having problems with database performance, and I have a lot of experience with .NET Profilers and always perform the analysis on the app, but much like a lot of developers I am now waiting until really late (when its a problem) to start analyzing and trying to gather the data on how to fix the issue. This is probably not going to...

Nested GridViews on single database call using objectdatasource

I'm trying to make a nested gridview setup I have run quicker. Right now the setup is the outer grid binds to an object datasource and on each row a detail gridview is nested and they bind to an objectdatasource. Both kinds of datasources use heavy db calls to fill them. What can I do to streamline and optimize this strategy. My firs...

How to prevent Googlebot from overwhelming site?

I'm running a site with a lot of content, but little traffic, on a middle-of-the-road dedicated server. Occasionally, Googlebot will stampede us, resulting in Apache maxing out its memory, and causing the server to crash. How can I avoid this? ...

monitor local network traffic issue

Hello everyone, I am using Networking Tab of Windows Task manager to monitor local network traffic to test how much bandwidth my application will use. My scenario is, I will use a local console client application to send data (using Http POST method) to local IIS 7.0 server. My issue is no traffic could be monitored using Networking Ta...

How expensive is reading file properties? .NET

We're experimenting with appending timestamps to some URL's to let things cache but freshen them when they do change. We have code that boils down to this: DateTime ts = File.GetLastWriteTime(absPath); where absPath is a MappedPath of a url. So the web server will be checking this file's last write time every time we serve up a link t...

Can this JavaScript be optimized?

This JS will be executed on pages with a lot of fields. Can you see anyway to improve the speed of this code? If so, can you explain what you found? var _TextInputs = null; function GetTextInputs() { if (_TextInputs == null) { _TextInputs = jq('input[type=text]'); } return _TextInputs; } var _Spans = null; func...

What is the most performant way to inject new code into the DOM?

Hi. I am engaged in a small debate with the server side developer for my project (I'm the front end guy) around injecting new stuff into DOM. He maintains that the best method to inject a large amount of code (received via ajax) is to send a JSON object and then to iterate through each item of that object. He says that will save some ba...

What does database query and insert speed depend on?

At my work we have a small database (as in two hundred tables and maybe a total of a million of rows or so). I've always expected it to be quite fast in the order of several ten of thousands insertion per second and with querys taking milliseconds once the connection is established. Quite the contrary we are having some performance pro...

Performance impact of gesture recognition in Delphi?

Delphi 2010 reportedly supports gestures for user interaction (mouse or touch interface), primarily through the Windows 7 gesture API. Will supporting gestures inherently incur a major performance hit? In other words, is most of the gesture-related processing due to detection, or response to, the gesture? By "response to", I mean the ...

Combining scripts - Toolscript manager vs CompositeScript in 3.5

I've been using the toolscriptmanager included in the AjaxControlToolkit on my site. This one has a CombineScript attribute that tells the scripmanager to combine the necessary scripts from ajax controls into one single script file. However, since 3.5, the standard scriptmanager has support for "<CompositScripts>" where you can combine ...

Is mysql using my index or not, and can the performance of geokit be improved?

I'm using geokit (acts_as_mappable) in a rails application, and the performance of radial or bounds searches degrades considerably when there is a large number of models (I've tried with 1-2million but the problem no doubt kicks in earlier than this). Geokit does all its calculations based on lat and lng columns in the table (latitude ...

What's the quickest way to remove an element from a Map by value in Java?

What's the quickest way to remove an element from a Map by value in Java? Currently I'm using: DomainObj valueToRemove = new DomainObj(); String removalKey = null; for (Map.Entry<String, DomainObj> entry : map.entrySet()) { if (valueToRemove.equals(entry.getValue())) { removalKey = entry.getKey(); break; } } if (remova...

Performance - Python vs. C#/C++/C reading char-by-char

So I have these giant XML files (and by giant, I mean like 1.5GB+) and they don't have CRLFs. I'm trying to run a diff-like program to find the differences between these files. Since I've yet to find a diff program that won't explode due to memory exhaustion, I've decided the best bet was to add CRLFs after closing tags. I wrote a pyth...

Interface Builder vs Cocos 2D - how choice the best for your app.

Hello everyone! I was a flash developer for 3 years, and in the last 5 months, i begin the iphone development, i do 2 applications with interface builder for clients, and now i really want to do a little game, is quite simple, one match 3! I made the engine in interface builder, and seens good to me! But after i read some posts, i really...

Dictionary vs Object - which is more efficient and why?

What is more efficient in Python in terms of memory usage and CPU consumption - Dictionary or Object? Background: I have to load huge amount of data into Python. I created an object that is just a field container. Creating 4M instances and putting them into a dictionary took about 10 minutes and ~6GB of memory. After dictionary is ready...

DrawingBrush Performance

Are there any differences when it comes to performance between the following three border objects? <Border Grid.Column="0" Grid.ColumnSpan="2" Opacity="1"> <Border.Background> <DrawingBrush> <DrawingBrush.Drawing> <DrawingGroup> <GeometryDrawing Brush="Red"> <GeometryDrawing.Geometry> ...