speed

ASP.NET MVC vs WebForms: speed and architecture comparison

I had an argument with one of my friends who is an architect at a pretty large internet company. Basically he was saying that ASP.NET MVC is not for large-scale enterprise applications, that it is not as flexible as WebForms, and that an MVC app will be slower than a web forms app. From my own experience working with MVC, I can say tha...

Setup expires headers PHP & Apache

How can I setup expires headers in PHP + Apache? I'm currently using an auto_prepend to serve resources gzipped but I'd also like to maximise the cache. How can I set these up? ...

How to measure and collect loading speed data of a website across the globe?

I have used tools such as YSlow to measure the loading speed of our website. Since I am located in Germany, our customers however are mostly in Asia (and our server in the US), I would like to measure the 'real' loading speed on the customer side. Anyone has a hint on how this could be accomplished? ...

Ultra fast drawing in DotNET

Initial tests indicate that GDI+ (writing in VB.NET) is not fast enough for my purposes. My application needs to be able to draw tens of thousands of particles (coloured circles, very preferably anti-aliased) in a full screen resolution at 20+ frames per second. I'm hesitant to step away from GDI+ since I also require many of the other ...

jQuery html() acting really slow

I was testing something I read earlier about how random Math.random() really is, and wanted to display 10000 numbers that was supposed to be a random number between 0 and 10000000. To see the test, I chose to just join the array of random numbers to a string with <br> between each integer. And then I just did $("#"+elm).html(randomNumbe...

Unique constraint in Mnesia

I am developing an Erlang application which requires a LOT of DB writes. My schema has, in addition to the primary key, another attribute with a unique constraint enforced. Say I have an ID, an unique_constraint_field, and some other fields. I need to now update a row in the DB corresponding to the unique ID, given that no other row sh...

MySQL "inserts" speed difference between production and local environment is too big!

Hi, I have installed MySQL 5.1x instance on a Linux machine (768MB RAM). I restored a backup of about 1000 rows and through my .NET application (deployed on a different Windows webserver) I performed certain read operations, which, when considering that the table had no indexes, were fast. I then cleared the server from these rows and ...

Is this a good way to use dlls? (C++?)

I have a system that runs like this: main.exe runs sub.exe runs sub2.exe and etc. and etc... Well, would it be any faster of more efficient to change sub and sub2 to dlls? And if it would, could someone point me in the right direction for making them dlls without changing a lot of the code? ...

Does creating separate functions instead of one big one slow processing time?

I'm working in the Google App Engine environment and programming in Python. I am creating a function that essentially generates a random number/letter string and then stores to the memcache. def generate_random_string(): # return a random 6-digit long string def check_and_store_to_memcache(): randomstring = generate_random_strin...

Will reading a file be faster with a FILE* or an std::ifstream?

I was thinking about this when I ran into a problem using std::ofstream. My thinking is that since std::ifstream, it wouldn't support random access. Rather, it would just start at the beginning and stream by until you get to the part you want. Is this just quick so we don't notice? And I'm pretty sure FILE* supports random access so th...

Is there any free network drive/share benchmark tool for Windows?

I want to know if there is any free tool to test the performance of a smb/CIFS network share. All free speed test I saw were for local drives only. ...

What's faster IN or OR?

In T-SQL what's faster? DELETE * FROM ... WHERE A IN (x,y,z) Or DELETE * FROM ... WHERE A = x OR A = y OR A = z In my case x, y and z are input parameters for the stored procedure. And I'm trying to get the performance of my DELETE and INSERT statements to the best of my abilities. ...

php string versus boolean speed test

I'm looking at trying to optimise a particular function in a php app and foolishly assumed that a boolean lookup in a 'if' statement would be quicker than a string compare. But to check it I put together a short test (see below). To my surprise, the string lookup was quicker. Is there anything wrong with my test (I'm wired on too much c...

Is Perl faster than bash?

I have a bash script that cuts out a section of a logfile between 2 timestamps, but because of the size of the files, it takes quite a while to run. If I were to rewrite the script in Perl, could I achieve a significant speed increase - or would I have to move to something like C to accomplish this? #!/bin/bash if [ $# -ne 3 ]; then ...

clearing a small integer array: memset vs. for loop

There are two ways to zero out an integer/float array: memset(array, 0, sizeof(int)*arraysize); or: for (int i=0; i <arraysize; ++i) array[i]=0; obviously, memset is faster for large arraysize. However, at what point is the overhead of memset actually larger than the overhead of the for loop? For example, for an array of size 5...

MySQL 1 millon row query speed

Hi, I'm having trouble getting a decent query time out of a large MySQL table, currently its taking over 20 seconds. The problem lies in the GROUP BY as MySQL needs to run a filesort but I don't see how I can get around this QUERY: SELECT play_date, COUNT(DISTINCT(email)) AS count FROM log WHERE type = 'play' AND play_date BETWEEN ...

Will a task be completed faster if it is the active window?

Hey everyone, I have heard a myth that a job will finish faster if it is kept as the active window, and not in the background or minimized. Is there any truth to this? Does the CPU put precedence to tasks where this happens? Thanks, ...

How to quickly retrieve tags in array from string?

I have $_GET['tags'] = "apples, oranges, bananas, grapes, cherries" I need to place the data into an array ($tags). What is a quick way to trim each item and perform security functions (stripping html, special chars)? ...

Is it possible to type style sheets in Firebug fast and convenient ? (as in Aptana)

For example, when I type the first of the parenthesis in Aptana, the second appears immediately, then I need only to press enter, it makes some white space, and I can type further. A small feature that saves a lot of time! But in Firebug it is not. So, is it possible to use that feature in Firebug? Is there any Firebug's plugin that all...

In C, which is faster: if with returns, or else if with returns?

Is it better to have if / else if, if every block in the if statement returns, or is it better to have a chain of ifs? To be specific, which if fastest: A: if (condition1) { code1; return a; } if (condition2) { code2; return b; } //etc... B: if (condition1) { code1; return a; } else if (condition2) { code2; return b;...