performance

How to increase the timeout to a web service request?

I have an ASP.NET web application that I can't modify (I only have the binaries). This application connects to a web service and it seems like the connection is closed from the client side (my web app). I have increased the "executionTimeout" in the machine.config of the destination server but my web app seems to still stop after waiting...

Optimizing Haskell code

I'm trying to learn Haskell and after an article in reddit about Markov text chains, I decided to implement Markov text generation first in Python and now in Haskell. However I noticed that my python implementation is way faster than the Haskell version, even Haskell is compiled to native code. I am wondering what I should do to make the...

Tools for Window service performance testing

Can you recommend open source and commercial tools for testing Windows services? I want to test for memory usage, leaks, etc. C# 2.0 - Window Services. ...

Cache layer for MVC - Model or controller?

Hi everyone, I am having some second thoughts about where to implement the caching part. Where is the most appropriate place to implement it, you think? Inside every model, or in the controller? Approach 1 (psuedo-code): // mycontroller.php MyController extends Controller_class { function index () { $data = $this->model...

SQL Timstamp Function

Is there any difference between these two queries? select * from tbl where ts < '9999-12-31-24.00.00.000000'; and select * from tbl where ts < timestamp('9999-12-31-24.00.00.000000'); When is the timestamp function required? Is there a difference in performance? ...

Serialization Performance and Google Android

I'm looking for advice to speed up serialization performance, specifically when using the Google Android. For a project I am working on, I am trying to relay a couple hundred objects from a server to the Android app, and am going through various stages to get the performance I need. First I tried a terrible XML parser that I hacked toge...

I'm asked to tune a long starting app into a short time period

Hi, I'm asked to shorten the start-up period of a long starting app, however I have also to obligate to my managers to the amount of time i will reduce the startup - something like 10-20 seconds. As I'm new in my company I said I can obligate with timeframe of months (its a big server and I'm new and I plan to do lazy load + performanc...

Java Collection performance question

I have created a method that takes two Collection<String> as input and copies one to the other. However, I am not sure if I should check if the collections contain the same elements before I start copying, or if I should just copy regardless. This is the method: /** * Copies from one collection to the other. Does not allow empty st...

Is Java serialization a tool to shrink the memory footprint?

Hey folks, does serialization in Java always have to shrink the memory that is used to hold an object structure? Or is it likely that serialization will have higher costs? In other words: Is serialization a tool to shrink the memory footprint of object structures in Java? Edit I'm totally aware of what serialization was intended for...

PHP code's performance test

What is the best way for test my php code's performance? ...

Any SQLite profilers available?

Are there any good SQLite profilers? I need something similar to what JetProfiler offers for MySQL. I've found a 3-year-old blog post - any other ideas? ...

Good strategy for copying a "sliding window" of data from a table?

I have a MySQL table from a third-party application that has millions of rows and only one index - the timestamp of each entry. Now I want to do some heavy self-joins and queries on the data using fields other than the timestamp. Doing the query on the original table would bring the database to a crawl, adding indexes to the table is not...

WCF Host taking long time to start when machine connected to network

We have created a small WCF test project in order to test and isolate this problem. We are running Windows 7 64bit and Visual Studio 2008. When we press F5 to run, it takes about 10 seconds to start the WCF host. If we remove the network cable and press F5, it takes less than 1 second to start. If we turn on the wireless network it a...

S.O.A. with .NET for scalability

Anyone know where I can find useful resource for some information for this. I reckon SOA is the way to go for scalabilty, but are there down sides such as performance and security I should look at. Overall what architecture should be considered best for enterprise web applications A good , complete, up to date book would be valuable, an...

What is faster when looking in lists of strings? "In" or "index"?

Hello! I have a bunch of lists of strings and I need to know if an string is in any of them so I have to look for the string in the first list, if not found, in the second, if not found, in the third... and so on. My question is: What is faster? if (string in stringList1): return True else: if (string in stringList2): ...

Performance: float to int cast and clipping result to range

I'm doing some audio processing with float. The result needs to be converted back to PCM samples, and I noticed that the cast from float to int is surprisingly expensive. Whats furthermore frustrating that I need to clip the result to the range of a short (-32768 to 32767). While I would normally instictively assume that this could be as...

What can cause my code to run slower when the server JIT is activated?

I am doing some optimizations on an MPEG decoder. To ensure my optimizations aren't breaking anything I have a test suite that benchmarks the entire codebase (both optimized and original) as well as verifying that they both produce identical results (basically just feeding a couple of different streams through the decoder and crc32 the o...

C# - What's are the available multi dimensional data structures that perform well?

I need to store multi-dimensional data consisting of numbers in a manner thats easy to work with. I'm capturing data in real time (processing live video frames every 40ms/10ms), and once processed I would destroy and GC older data. This data structure must be fast so it won't hit my overall app performance. The faster the better (my alg...

Fast way to pass a simple java object from one thread to another

I have a callback which receives an object. I make a copy of this object, and I must pass it on to another thread for further processing. It's very important for the callback to return as fast as possible. Ideally, the callback will write the copy to some sort of lock-free container. I only have the callback called from a single thread ...

Create a PHP cache system in MySQL database?

I'm creating a web service that often scrapes data from remote web pages. After scraping this data, I have a simple multidimensional array of information to use. The scraping process is fairly taxing on my server, and the page load takes a while. I was considering adding a simple cache system using a MySQL database, where I create one ro...