performance

Alternative regular expression to do this "\.(asmx(?!/js)|aspx|htm)"

Is there a way to rewrite this regex expression such that it does not include a lookahead for "/js"? Is this even something that I should worry about in terms of performance? It is being used to filter HTTP requests. \.(asmx(?!/js)|aspx|htm) Edit: To be clear: I'd like to specifically prevent ".asmx/js" but allow all other .asmx re...

Using IIS 7.0: urlCompression with heavy ViewState enterprise application

IIS 7.0: urlCompression What is the best configuration of this feature in an enterprise application with heavy ViewState usage, large content pages along with highly configurable data? Assume: Strong database server Web farm Load balanced What I am not asking is alternatives to boost performance, just this feature specifically. ...

How to find out what mach_msg_trap waits for?

I a profiling my iPhone application on target, and according to Instruments 65% of the time is spent in mach_msg_trap. I have a background thread that runs-forever and send results back to the main thread using performSelectorOnMainThread:withObject:waitUntilDone:, aproximately every 2 seconds. I am not waiting until done. // Fredrik ...

Fastest way to match telephony prefixes using asterisk PHP script

Hello all, and thanks in advance for the help. Background - I am writing a PHP script that needs to figure out the destination the caller is trying to reach. Telephony prefixes are strings that identify a destination. For each call, the program must find the longest prefix that matches the string. For example the number 30561234567 wou...

What is a good way to optimize an Oracle query looking for a substring match ?

I have a column in a non-partitioned Oracle table defined as VARCHAR2(50); the column has a standard b-tree index. I was wondering if there is an optimal way to query this column to determine whether it contains a given value. Here is the current query: SELECT * FROM my_table m WHERE m.my_column LIKE '%'||v_value||'%'; I looked at Ora...

Formatting Performance in Microsoft ReportViewer Control

I am building a price list ap for use in my Business (in C# 3.5 using VS 2008 and WinForms) to replace an excel spreadsheet that suffers from 15 years of trying to get it to do things excel does not do well. I am presenting the list in a ReportViewer. The report has about 650 rows and 17 columns. It loads very quickly without any condit...

Comparing performance between ruby and python code

I have a memory and CPU intensive problem to solve and I need to benchmark the different solutions in ruby and python on different platforms. To do the benchmark, I need to measure the time taken and the memory occupied by objects (not the entire program, but a selected list of objects) in both python and ruby. Please recommend ways to...

WPF Performance: Displaying thousands of Paths / Shapes on a Canvas

I'm currently developing a visualization tool that draws WPF shapes such as paths, ellipses etc. on a Canvas. I've already implemented a virtualized approach where Shapes are being destroyed and created on the fly depending on their visibility. However, even with only like 600 ellipses visible, the application seems to struggle. What a...

How to speed up Java VM (JVM) startup time?

I am running tests that start multiple JVM processes. Summary startup time of JVMs is quite significant compared to time of actual tests that run inside JVM. How do I speed things up? I have used "-client" option already, this does help but not as much as I wanted. Is there any other way, say preloading bunch of JVMs and reusing them so...

O(log N) == O(1) - Why not?

Whenever I consider algorithms/data structures I tend to replace the log(N) parts by constants. Oh, I know log(N) diverges - but does it matter in real world applications? log(infinity) < 100 for all practical purposes. I am really curious for real world examples where this doesn't hold. To clarify: I understand O(f(N)) I am cu...

MySQL Performance inquiry

I have moved my drupal site from one mysql server to another one. Old Machine has 1 cpu, 1GB Ram New Machine has 4 cpu, 4GB Ram. I have a huge negative difference in perfomance on this query ( 2 mins vs 2 secs ) select distinct c.client from client_table c LEFT JOIN reps r on ( c.client = r.client ) where r.user_id is...

Performance issues with hard disk reading

I have a C++ program which reads files from the hard disk and does some processing on the data in the files. I am using standard Win32 APIs to read the files. My problem is that this program is blazingly fast some times and then suddenly slows down to 1/6th of the previous speed. If I read the same files again and again over multiple run...

Why does ADO Next record processing slow down in Delphi?

I had a Delphi 4 program that I developed many years ago that used Opus DirectAccess to sequentially search through a Microsoft Access database and retrieve desired records. Delphi 4 did not have ADO, so that's why I was using DirectAccess. But I've now upgraded to Delphi 2009 and converted the program to use ADO. What I found was that ...

Guidance on optimising Python runtime for embedded systems with low system resources

My team is incorporating the Python 2.4.4 runtime into our project in order to leverage some externally developed functionality. Our platform has a 450Mhz SH4 application core and limited memory for use by the Python runtime and application. We have ported Python, but initial testing has highlighted the following hurdles: a) start-...

WPF Dragging causes renderer to stop

I'm having a problem with my WPF app, where any sort of drag operation stops the UI from updating. The issue seems periodic, as in, the item drags, stops, drags again, stops, etc. in 2 second intervals. It's affecting all controls, including scroll bars. If checked this question as well as this one, and it doesn't seem to be caused by w...

What should I check before my Ruby on Rails web site goes live?

As a developer new to Rails, I'd like to know what checklists seasoned Rails developers might have of things to check before putting a Ruby on Rails web site live. I am thinking that you should probably remove generated views that you aren't using, remove controller actions you don't need, remove default routes and so forth. I'm thin...

Would it be a bad idea to develop a desktop application that directly accesses the SQL server?

Hi! I want to install a desktop application (on many stations - about 10-20) should access the SQL Server directly, no Services, and no server-DALs. The application will be installed on a local network on about 10 machines, while one of them is a server. When I will install the program I will set the connection string, and the applicat...

AS3 Untyped Variable Efficiency

I'm (still) trying to solve an issue in my 2D Flash game where my framerate is dropping to unacceptable lows. I have a class with the following member variable and method: protected var value:*; public function getValue () :* { return this.value; } Right now, that method is being called seemingly a few hundred times per frame and ...

How to get a rough estimate of LAMP application capacity?

I have a LAMP application running fine, however the number of users are increasing each day. I don't want to be hit with a surprise one morning and find that everything broke because of overload. Is there a way to get a rough estimate of what capacity of the LAMP it is at? I know that a full detailed report is many books worth of study...

Performance difference between C++ and C# for mathematics

I would like to preface this with I'm not trying to start a fight. I was wondering if anyone had any good resources that compared C++ and C# for mathematically intensive code? My gut impression is that C# should be significantly slower, but I really have no evidence for this feeling. I was wondering if anyone here has ever run across a ...