performance

Does adding width and height to inline images increase the page load performance?

Does adding width and height to inline images increase the page load performance? <img id="moon" height="200" width="450" src="http://www.domain.com/moon.png" alt="moon image" /> Compare to this <img id="moon" src="http://www.domain.com/moon.png" alt="moon image" /> ...

If we would give width and height to <table> then will it load quickly?

If We are using table for to show tabular data and if we would give width and height to <table> then will it load quickly? will page loading speed improved of table? ...

fast algorithm implementation to sort very small set

hello. This is the problem I ran into long time ago. I thought I may ask your for your ideas. assume I have very small set of numbers (integers), 4 or 8 elements, that need to be sorted, fast. what would be the best approach/algorithm? my approach was to use the max/min functions (10 functions to sort 4 numbers, no branches, iirc). /...

Is it true "JavaScript files are not reliably cached by browsers, CSS files are"

as mentioned on this site Note that while JavaScript files are not reliably cached by browsers, CSS files are. http://www.websiteoptimization.com/speed/tweak/http/ ...

Advantage of using a static member function instead of an equivalent non-static member function?

I was wondering whether there's any advantages to using a static member function when there is a non-static equivalent. Will it result in faster execution (because of not having to care about all of the member variables), or maybe less use of memory (because of not being included in all instances)? Basically, the function I'm looking a...

Is there really such a thing as a char or short in modern programming?

Howdy all, I've been learning to program for a Mac over the past few months (I have experience in other languages). Obviously that has meant learning the Objective C language and thus the plainer C it is predicated on. So I have stumbles on this quote, which refers to the C/C++ language in general, not just the Mac platform. With C ...

iPhone Image Resources, ICO vs PNG, app bundle filesize

My application has a collection of around 1940 icons that are used throughout. They're currently in ICO and new images provided to me come in ICO format too. I have noticed that they contain a 16x16 and 32x32 representation of each icon in one file. Each file is roughly 4KB in filesize (as reported by finder, but ls reports that they v...

Any reason not to use USE_ETAGS with CommonMiddleware in Django?

The only reason I can think of is that calculating ETag's might be expensive. If pages change very quickly, the browser's cache is likely to be invalidated by the ETag. In that case, calculating the ETag would be a waste of time. On the other hand, a giving a 304 response when possible minimizes the amount of time spent in transmission. ...

F# performance in scientific computing

hello. I am curious as to how F# performance compares to C++ performance? I asked a similar question with regards to Java, and the impression I got was that Java is not suitable for heavy numbercrunching. I have read that F# is supposed to be more scalable and more performant, but how is this real-world performance compares to C++? s...

Variables versus constants versus associative arrays in PHP

I'm working on a small project, and need to implement internationalization support somehow. I am thinking along the lines of using constants to define a lot of symbols for text in one file, which could be included subsequently. However, I'm not sure if using variables is faster, or if I can get away with using associative arrays without ...

Dataset Designer Performance Question

Can anyone tell me if there are any performance overheads to using the dataset designer as opposed to setting up the data connection using code and manually retrieving the data? ...

Updating multiple Sprites - AS3 performance best practices

Within the container "BubbleContainer" I have multiple "Bubble sprites". Each bubble's graphics object (a circle) is updated on a timer event. Let's say I have 50 Bubble sprites and each circle's radius should be updated with a mathematical formula. How do I organize this logic? How do I update all Bubble sprites within the BubbleCont...

Explanation of Pingdom Results

Hi, I'm trying to optimize my page load times, and I'm using Pingdom to test the site response times. However, I'm not exactly sure what the various components of the "time bar" mean. Example link: http://tools.pingdom.com/fpt/?url=http://neosmart.net/forums//&amp;id=2230361 According to them, the portion of the bar that is yellow is ...

Mysql count how many queries per second are executed, is there any way ?

Hello, i have a busy web server with LAMP installed, and i was wondering, is there any way to count how many queries per second (mysql) are executed in the server ? Thank you. ...

Using boost unordered map

Guys, I am using dynamic programming approach to solve a problem. Here is a brief overview of the approach Each value generated is identified using 25 unique keys. I use the boost::hash_combine to generate the seed for the hash table using these 25 keys. I store the values in a hash table declared as boost::unordered_map<Key_Object,...

How to cache and store objects and set an expire policy in android?

I have an app fetch data from internet, for better performance and bandwidth, I need to implement a cache layer. There are two different data coming from the internet, one is changing every one hour and another one does not change basically. So for the first type of data, I need to implement an expire policy to make it self deleted afte...

Partitioning requests in code among several servers

I have several forum servers (what they are is irrelevant) which stores posts from users and I want to be able to partition requests among these servers. I'm currently leaning towards partitioning them by geographic location. To improve the locality of data, users will be separated into regions e.g. North America, South America and so on...

Testing performance of queries in mysl

I am trying to setup a script that would test performance of queries on a development mysql server. Here are more details: I have root access I am the only user accessing the server Mostly interested in InnoDB performance The queries I am optimizing are mostly search queries (SELECT ... LIKE '%xy%') What I want to do is to create rel...

how to measure hibernate performance?

how to measure performance in hibernate? I want to know that how much time hibernate takes to execute a query? ...

Help me choose between XML or SQL Lite on android

I have an android app that periodically, say once a week downloads content from a server in XML. The content is used by the app, different Acitivities use different parts of the content. My question is a design one, should I save the data in SQlite or just keep it as an XML file, which one would be faster to read? The app can only use...