performance

Django's performance on serving static files

I am prototyping a Django web-app that will provide a static media files (PDFs, movies and so on) to the users. One of the features I am going to implement is a dynamic URLs. The point is to generate different URLs for each access attempt. When user will request a list of files I will generate links and save them to the DB. When some of ...

Encoding data in URL for efficient transport

Hello, I'm searching for a library that can encode data in URL, because using plain "&param=value is" inefficient. I'm looking for a library that will accept a defined set of parameters and will encode it into a format that is safe to sent over HTTP GET request. I will be using this to send tracking events from my player to the backend...

MS Sql 2008 index on two columns for 2D position

Hi, I have table named "Map" with structure "XPos int, YPos int, FieldType int". The "XPos" and "YPos" are primary key. There are several tables depending on this table, referencing "XPos" and "YPos" columns. In "Map" table users can not add or remove rows. Rarely is changed value in "FieldType" column. The most selects looks like: ...

Best way for Background processing in PHP based application

I am working on a huge php application with Zend framework, in that project we need to process files and create thumbnails for images, videos, documents for which we are using imagemagick, ffmpeg, openoffice in background process. To make the process optimized and fast with minimum resources I am thinking of implementing this process usi...

Caching web page

Does websites like twitter and facebook ( where the content change often ) use caching ? ...

Is it really bad to use * in SQL?

Possible Duplicate: SQL: Using Select * Hi everyone! I wonder if it is really a bad idea to use the * symbol in stored procedure in SQL server? Is really better to write SELECT NAME, AGE, OTHER_STUFFS FROM TABLE than SELECT * FROM TABLE For sure is only 3 columns in the table.. For performances is it better to enu...

Winforms Usercontrol: Perfomance issues when creating and adding to parent.

Hi there, I have built a UserControl for display a list of other UserControls which themselves are bound to individual data objects. The link below shows an example implementation of this control. Each of the individual user rows is its own UserControl/XtraUserControl, laid out in a FlowLayoutPanel. The problem I have is with perfo...

Database and DB engine for social website

For a heavy user content website with user profiles, live feeds, photo /video/content sharing, etc what DB to use, and what DB engine? Ofcourse Oracle/Microsoft sql are out because they are not free (or cheap). I am using MySQL with MyISAM but that will run into performance issues on a social site. Even using InnoDB may not help performa...

In C# between >0 and >=1 which is faster and better?

In C# between >0 and >=1 which is faster and better? ...

How does the `primary key` keyword relate to clustered indexes in SQL Server?

How does the PRIMARY KEY keyword relate to clustered indexes in SQL Server? (Some people seem to want to answer this question instead of a different question I asked, so I am giving them a better place to do so.) ...

What is an efficient way to make a PHP front end to a Django project (that runs through cgi)?

I want to develop a site in Django, to have the convenient ORM, and admin, to ease administration. However, the only hosting option I have is running Django through CGI. Therefore, I would also like to make a "read-only" front end in PHP, which will make the experience "normal" for everyday use (i.e only editing [the database] and authe...

Improving tooltip performance but now does not work in IE7 or IE6 jquery and inline styles

I have created a tooltip that appends a DIV with text to the page. I have managed to get it to appear in the position i want and follow the mouse as it moves. I was previously doing this with inline styles and updating the top, left absolute positioning co-ordinates dynamically inline. This seems to cause performance issues so i wrote...

LINQ or foreach - style/readability and speed

I have a piece of code for some validation logic, which in generalized for goes like this: private bool AllItemsAreSatisfactoryV1(IEnumerable<Source> collection) { foreach(var foo in collection) { Target target = SomeFancyLookup(foo); if (!target.Satisfactory) { return false; } } ...

PDF in webview performance

Hi - I am using the following (simple) code to load a PDF from the documents folder in my app into a UIWebView. The performance is very poor. I tried loading the same PDF from the web via Safari and the performance was great. Does anyone have any ideas? (this viewController is being presented as a modalViewController). - firstView.m In...

std::vector is so much slower than plain arrays?

I've always thought it's the general wisdom that std::vector is "implemented as an array," blah blah blah. Today I went down and tested it, seems to be not so: Here's some test results: UseArray completed in 2.619 seconds UseVector completed in 9.284 seconds UseVectorPushBack completed in 14.669 seconds The whole thing completed in 26....

Javascript jQuery best way to insert a big piece of code into DOM

I have a big piece of code that needs to be inserted into DOM at some point. The code also contain some variables: <ul id="info'+value+'" class="info"><li class="hide"></li><li class="lock"><ul> // just a piece of the code with variable "value" Right now I am doing: var codeToInsert = "<some code/>" codeToInsert.insertAfter('#someID'...

Xcode Instruments CPU time

if i run an application with the performance test, the "cpu monitor" show me some informations like process ID/Name or CPU Time. But in which unit of time does it measure ? An example: if i get 05.04 , what does mean for me Best Regards ...

Optimizing C++ code for performance

Can you think of some way to optimize this piece of code? It's meant to execute in an ARMv7 processor (Iphone 3GS): 4.0% inline float BoxIntegral(IplImage *img, int row, int col, int rows, int cols) { 0.7% float *data = (float *) img->imageData; 1.4% int step = img->widthStep/sizeof(float); // The subtraction by o...

Is there a performance difference in MySQL between IN and several OR clauses?

Is there any performance difference between the two following queries: SELECT foo,bar FROM table WHERE id IN (1,2,3); and SELECT foo,bar FROM table WHERE id = 1 OR id = 2 OR id = 3; I'm sure the difference in negligible in a small example like this, but what about when the number of valid IDs is much larger? ...

Designing library performance comparison tests

I am getting ready to perform a series of performance comparisons of various of the shelf products. What do I need to do to show credibility in the tests? How do I design my benchmark tests so that they are respectable? I am also interested in any suggestions on the actual design of the tests. Ways to load data without effecting th...