performance

The Logistics Side of Using Multiple Sub Domains for Static Content

It's generally considered a best practice to serve static content, such as images and css, from different sub domains (images1.domain.com, images2.domain.com, etc). I've seen this discussed in detail in various places, however I'm concerned about the general logistics of this in terms of maintainability. Our site has thousands of pages...

CSS Performance Question

I was wondering what the experts do when it comes to writing CSS code. Is it bad to use the tagname.className style? Does inheritance cause a noticeable performance loss? Does it only affect the browser when loading a page or also after? eg: user scrolls down further the page, would poor CSS be a culprit to sluggish scrolling when viewin...

Sqlite subqueries : in one big query or in a for loop ?

I was planning to benchmark that but since it's a lot of work, I'd like to check if I didn't miss any obvious answer before. I have a huge query that gets some more details for each row with a subquery. Each row is then used in a ListAdapter that is plugged in a ListView, so another loop take each row one by one to make it a ListItem. ...

IN vs. JOIN with large rowsets

I'm wanting to select rows in a table where the primary key is in another table. I'm not sure if I should use a JOIN or the IN operator in SQL Server 2005. Is there any significant performance difference between these two SQL queries with a large dataset (i.e. millions of rows)? SELECT * FROM a WHERE a.c IN (SELECT d FROM b) SELECT a.*...

Is there a performance hit for a Silverlight application while implementing MVVM pattern using Databinding?

Hi, I am implementing the Model-View-ViewModel (MVVM) pattern in one of the forms of my SL2 appication using INotifyPropertyChanged interface and TwoWay Databinding. However I feel that due to this approach, my form behaves slightly sluggishly. I just wanted to know whether using this approach is there any performance hit in such SL...

Is this a valid benefit of using embedded SQL over stored procedures?

Here's an argument for SPs that I haven't heard. Flamers, be gentle with the down tick, Since there is overhead associated with each trip to the database server, I would suggest that a POSSIBLE reason for placing your SQL in SPs over embedded code is that you are more insulated to change without taking a performance hit. For example. L...

How do I stop custom performance counter instance names from being auto converted to lower case

I have created a multi-instance performance counter and I pass it mixed case instance names but somehow the instance names get converted to lower case when I view them both through code and in perfmon. Does anyone know how to prevent this? Found this on google, thought it was nice of Luke Zhang to never follow up. ...

WPF Databinding performance

I am building an wpf app using MVVM. I have viewModels the employ lazy loading like below: public class AssignmentsViewModel { List<AssignmentViewModel> _Assignments; public List<AssignmentViewModel> Assignments { get { if (_Assignments == null) _Assignments = new List<AssignmentV...

How is Visual Studio 2010 performance compared to 2008?

Thinking about installing Visual Studio on my Asus eee 1000HE. Since it is not a very powerful machine, I am wondering if I should install 2008 or the new 2010. Looks like there has been a lot of changes done to the UI, etc. Does that mean that it now runs smoother as well? Or is it actually heavier to run? ...

Struts/JSP/J2EE performance and memory profiling and issues

We are using Struts and having performance issues. And making heavy use of jsp includes, tiles, EL expressions. I am sure this is eating up a lot of memory and processing time. What are some approaches to profile the JSP page? What tools could I use? What should I look for when profiling? I have seen the code generated JSP Java Ser...

C++, ways to benchmark improvements in cache locality?

I have an implementation of a class X, that has two pointers to two pieces of information. I have written a new implementation, class Y, that has only one pointer to a struct that contains the two pieces of information together as adjacent members. X's and Y's methods usually only need to manipulate one of the pieces of information, but ...

Optimizing a simple query on two large tables

I'm trying to offer a feature where I can show pages most viewed by friends. My friends table has 5.7M rows and the views table has 5.3M rows. At the moment I just want to run a query on these two tables and find the 20 most viewed page id's by a person's friend. Here's the query as I have it now: SELECT page_id FROM `views` INNER J...

Measure number of events fired?

I am doing some tuning in a very large application. Is there a way to measure number of events fired in an application? For example using something in System.Diagnostics? Adding code inside events is NOT an acceptable solution due to the size of the application. There are profiling tools, but the fast and simple approach for me would b...

Fastest way to iterate in Java

In Java, is it faster to iterate through an array the old-fashioned way, for (int i = 0; i < a.length; i++) f(a[i]); Or using the more concise form, for (Foo foo : a) f(foo); For an ArrayList, is the answer the same? Of course for the vast bulk of application code, the answer is it makes no discernible difference so the mo...

Best method for storing data in mysql?

Hi, I have a pretty basic question on which is the preferred way of storing data in my database. I have a table called "users" with each user getting a username and user_id. Now, I want to make a table called "comments" for users to comment on news. Is it better to have a column in comments called "username" and storing the logged in ...

PHP Object Caching performance

Is there difference between caching PHP objects on disk rather than not? If cached, objects would only be created once for ALL the site visitors, and if not, they will be created once for every visitor. Is there a performance difference for this or would I be wasting time doing this? Basically, when it comes down to it, the main questio...

For VS Foreach on Array performance (in AS3/Flex)

Which one is faster? Why? var messages:Array = [.....] // 1 - for var len:int = messages.length; for (var i:int = 0; i < len; i++) { var o:Object = messages[i]; // ... } // 2 - foreach for each (var o:Object in messages) { // ... } ...

How do you speed up java unit tests?

Currently our project has over 3000 unit tests, and "ant testAll" takes well over 20 minutes. besides getting better hardware, are there ways to speed things up? ...

What makes Ruby slow?

Ruby is slow at certain things. But what parts of it are the most problematic? How much does the garbage collector affect performance? I know I've had times when running the garbage collector alone took several seconds, especially when working with OpenGL libraries. I've used matrix math libraries with Ruby that were particularly slo...

How do I speed up the gwt compiler?

We're starting to make heavier use of GWT in our projects, and the performance of the GWT compiler is becoming increasingly annoying. We're going to start altering our working practices to mitigate the problem, including a greater emphasis on the hosted-mode browser, which defers the need to run the GWT compiler until a later time, but...