performance

Delphi App Communicates with Program That Ends Up Crashing Occasionally - Vendor Blames My Delphi App

I've written a Delphi DLL that communicates with a third party program via COM. Some users report that the third party program crashes occasionally. Others using the software in an identical fashion have never experienced a crash. When this crash occurs, the third party program appears to simply become unavailable in my DLL app. The ...

To use sleep() or cron job

Hey! I have this mail script I have to run a few times. To start the script I will use cron, but the script has to run 2 or 3 more times (with an hour apart). What's the best way to do this? To use the sleep command for an hour, or at the end of the script, place some code, so that the script will create a new cron job to run it self...

Is LINQ to Everything a good abstraction?

There is a proliferation of new LINQ providers. It is really quite astonishing and an elegant combination of lambda expressions, anonymous types and generics with some syntax sugar on top to make it easy reading. Everything is LINQed now from SQL to web services like Amazon to streaming sensor data to parallel processing. It seems like s...

Creating a quicker MySQL Query

I'm trying to create a faster query, right now i have large databases. My table sizes are 5 col, 530k rows, and 300 col, 4k rows (sadly i have 0 control over architecture, otherwise I wouldn't be having this silly problem with a poor db). SELECT cast( table2.foo_1 AS datetime ) as date, table1.*, table2.foo_2, foo_3, foo_4, fo...

Usefulness of separating database files and trans logs among partitions

Some guys where I work are setting up a new database server for SQL Server. The server has a system drive that also stores backups and a single RAID 5 array for the database files. The RAID 5 array is logically partitioned into 2 drives. One is for the actual database files (MDF) and the other is for the transaction logs (LDF). The quote...

SQL Server 2008 Hierarchy Data Type Performance?

How does SQL Server 2008's Hierarchy data type perform compared to using the hierarchy implementation described by Joe Celko here: http://www.intelligententerprise.com/001020/celko.jhtml? I've used Celko's method in the past with great results - but don't want to implement it for a new project unless it's better than what Microsoft has ...

Why is IE7 so slow compared to Safari?

I have a large "grid" of data that takes about 40 seconds to generate and dump as plain text. If I wrap the text with html table formatting (with fixed td widths) it takes over 200 seconds to completely display in IE7, and under a minute to display in Safari. Small "grids" display in under 5 seconds in either browser, so I don't think ...

What is a good random number generator for a game?

What is a good random number generator to use for a game in C++? My considerations are: Lots of random numbers are needed, so speed is good. Players will always complain about random numbers, but I'd like to be able to point them to a reference that explains that I really did my job. Since this is a commercial project which I don't h...

Performance of MS Access when JOINing from linked tables in different servers?

If I have an MS Access database with linked tables from two different database servers (say one table from an SQL Server db and one from an Oracle db) and I write a query which JOINs those two tables, how will Access (or the Jet engine, I guess?) handle this query? Will it issue some SELECTs on each table first to get the fields I'm JOIN...

Rails: How do I minimize DB hits here? Eager loading isn't applicable

Hi, this question is maybe a little specific, but I think it's interesting from a general pov also. In a Rails App users can subscribe to other users. When I show a list of users I have to check, if the current user has subscribed to the users in the list. If he has subscribed, I show the unsubscribe button and the other way around. B...

Benefits of using XML Accelerators

What are XML Accelerators and how do they work? Is anyone using them in a production environment for systems that performs heavy XML processing? If yes, then how have you benefited in using them? ...

Reading from a file not line-by-line

Assigning a QTextStream to a QFile and reading it line-by-line is easy and works fine, but I wonder if the performance can be inreased by first storing the file in memory and then processing it line-by-line. Using FileMon from sysinternals, I've encountered that the file is read in chunks of 16KB and since the files I've to process are...

Where do I find a comparison of different STL containers complexity (performance)?

I googled quite a while in order to find out a comparison that shows the differences in complexity for all STL-Containers on insert/push erase/pop etc. I did not find any. Also not in all of my STL Books. Any hint? I know some rules of thumb of course. But where is a definition? ...

iPhone network performance

Hi all, I have a question and I am very open to suggestions (even very odd ones!) I am writing an iPhone app, which does a request (URL with parameters) to a server. As a response, the iPhone receives XML. All is well. Right now, I am looking to improve my application's speed by measuring the time it takes to perform certain tasks. I'...

XML frameworks in PHP

In addition to this question: iPhone network performance, I would like to know if there are any (very) good XML parsing frameworks out there for PHP. PHP has great XML support already, but I wonder if it could be better (in terms of performance, memory usage, etc). ...

Should I cache data pre-emptively

I have an application that receives messages from devices every few minutes. I also have clients that request the last 10 messages for a particular device. I am suffering with some database saturation and I wish to cache this list by device. The basic premise is that when a message is received from the device then the processor that rec...

pl/sql Stored procedure... where does the execution time go?

Hi everybody, I am currently tracing a performance leak in a stored procedure. Having a timestamp put out right after the initial "begin" and one right before the final "end" (I am doing a commit before) says the procedure takes abt. 10 secs to finish. However, I have to wait 2mins+ for it to end. Can anybody tell me where the rest of ...

How can I speed up the performance of the first execution of my .NET app?

Our C# client applications always take a much longer time to load on their first run. I haven't gone so far as to test if it is the first run of any .NET app that is slower, or if the first run of each .NET app is slower, but it remains a problem in any case. How can we eliminate this one-time startup hit? My initial thoughts are that...

Use php's readfile() or redirect to display a image file?

I've a directory outside the webroot with images, css and javascripts. These files often change. I could write a script which locates the file, figures out the mime type and outputs it to the browser. Or i could locate the file, copy it to a webaccessable directory and redirect to that file using header location. When the file is reques...

How to render and import an asp.net page into another asp.net page?

I have a ASP.NET page. I have another asp.net page, that i would like to render and import it's rendered results into my asp.net page. I don't want to use or use AJAX request as that would cause my visitors to make an unnecessary HTTP request and decrease performance. ...