performance

Parsing my flat-file on Iphone is a pain in the ***, Plz Help me out

Hey guys, stack overflow has already helped me a lot during my programming work so at first: Thanks a lot for all the asked questions and the excellent answers. Nevertheless I have a problem right now, for which I just couldn't find the right answer here. I am programming a Iphone App which is supposed to parse a flat-file from the we...

The best collection for holding a million items?

I would like to ask one interested (for me) question. What collection is the best by criteria performance if collection contains a lot of items (more than 1 million). By example, I create simple List(10000000) collection and try to add about 500000 different items. First 30000 items will be added in 10 seconds after running, but collec...

looking for link to runtime complexity and/or benchmarks table for JAXB

Hi all, I think the title should be pretty clear, but: I am looking to determine what kind of performance I can expect from a software component that is running JAXB--both for marshal and un-marshal operations. I'd hoped to find a page of benchmarks, or some sort of white paper that spoke about complexity, but my web searches haven't tu...

Implement taking a website offline?

Don't need to do this right now but thinking about the future... What would be your method to take a website "offline" for a little bit through a custom coded cms? Meaning give the capability for an admin to login into an admin panel, type a message into a box, and submit the form. That message would then display rather than any other p...

How do I update a foreign key efficiently in LINQ to SQL/SQLMetal?

I ran into an issue trying to update a foreign key field: record.ForeignId = newId; It bombs with "Operation is not valid due to the current state of the object" due to SQLMetal code that throws System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(). I was not the first to hit this issue: http://stackoverflow.com/questions/2...

Java system.out vs new PrintStream

What would use more memory if it were to output a message that was 15,000 lines? Would System.out.println us more memory? or Would System.setErr(new PrintStream(new FileOutputStream("tonsoflines.log"))) use more memory? What uses more process or requires more memory to function? Visual output in a console window or writing to a file w...

[jquery] Loading remote images last in a webpage

I link to a lot of remote images on my service. The issue is that sometimes, retrieving the images takes very long, and the whole page stalls as a result. What can i do to get the images to load at the end? ...

Improving DataTable performance

I have a DataTable populated with 250,000 records with 5 columns, I am iterating over this at least 500,000 times. The difference in performance between a table with 1000 records is massive and I can understand and appreciate why - however is there is a way to improve the performance? ...

readonly sqlite on a server

A few people have asked about using sqlite on a server; obviously it's not a good choice if you have to write to the database. What I am wondering about, is how well does it work in a read-only scenario? On the surface it seems it would work quite well: it supports concurrent access, and as long as we manage database updates in a smart ...

Rationale behind these performance numbers: Arrays vs Lists C#

Can anyone explain the reasons the numbers in this post are the way they are? http://stackoverflow.com/questions/454916/performance-of-arrays-vs-lists I was curious why the iterator for list performs so poorly but the for indexer was so close. ...

Transactions using mysql_real_escape_string

Working with MySQL lately, from PHP, I am wondering about this: What is the performance impact by using mysql_real_escape_string() multiple times at a script? Is it worth to try to reduce the number of calls to this function for a given script? Does it determines the character set of the connection each time is called, or this value is...

Why nosql with cassandra instead of mysql ?

I work on large database (hundreds of GB) and Mysql now gives me more or less satisfaction. I hesitate to cassandra on launch. What I want to know everything before, so this kind of DBMS NoSQL is supposed to be faster than MySQL? Several points: The change in the number of column on a row In Mysql, they must all be defined in advance...

PHP: What's the fastest way to query MySQL? Because PDO is painfully slow

I need to perform a simply query. Literally, all I need to perform is: SELECT price, sqft, zipcode FROM homes WHERE home_id = X When I use PHP PDO, which I've read is the recommended way to connect to a MySQL database, simply creating the connection takes a measured 610ms. My code is below: try { $conn_str = DB . ':host=' . DB...

.htaccess: How to "Specify a cache validator"?

I'm running Google PageSpeed on my site and it's tell me that I need to "Specify a cache validator." The following resources are missing a cache validator. Resources that do not specify a cache validator cannot be refreshed efficiently. Specify a Last-Modified or ETag header to enable cache validation for the following resources: ... t...

Optimize LEFT JOINS ORDER BY on multiple varchar columns

Hello everyone, I tried to optimize a MySQL query which sort multiple varchar columns: SELECT * FROM tickets LEFT OUTER JOIN customers ON customers.id = tickets.customer_id LEFT OUTER JOIN locations ON locations.id = tickets.location_id ORDER BY customers.name, locations.name; The ORDER BY statement seems to cost lot of time(~100ms) ...

Is there any big perfomance difference between RenderPartial and Partial?

Also RenderAction and Action. RenderXXX akaik write directly to response stream and XXX use additional string buffer. I don't really want doing benchmark my myself, so maybe someone already do it. ...

How to store mail info for mail client

I'm working on a side project right now for an email client. I'm using a library to handle the retrieval of the messages from the server. However, I have a question on caching. I don't want to fetch the entire list of headers everytime I load the client. Ideally, what I'd like to do is cache them and then update the list with what is...

How to improve blending performance to make smooth scrolling?

Fast intro Edit: I have 9 cells. All 9 cells contain bundle image. 7 bundle images have some kind of transparency (in file, not as a blending option in code) to load images from web underneath them. The scrolling problem affects the table view when both bundle and web images are loaded into arrays as UIImage objects. If I disable draw...

How to architect a video site, from a performance point of view

Hi guys, I want to build a high traffic video site, which has many videos and visitors, using ASP.NET. But I have no experience of high traffic sites and video sites. Anyone can give me some stuff to read or some keywords for me to google? In the performance point of view. Many thanks :) UPDATE: I said our site is similar to Youtube...

How do I learn enough about CLR to make educated guesses about performance problems?

Yes, I am using a profiler (ANTS). But at the micro-level it cannot tell you how to fix your problem. And I'm at a microoptimization stage right now. For example, I was profiling this: for (int x = 0; x < Width; x++) { for (int y = 0; y < Height; y++) { packedCells.Add(Data[x, y].HasCar); packedCells.Add(Data[x, ...