473,387 Members | 3,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Unexpected poor performance

I have a C# application that compiles other C# functions on-the-fly depending on user selections. There are several C# functions that can be selected. There is one that takes considerably longer than the rest. This function seems to have an unusual performance characteristic. If it is the first one selected it takes 7 times longer to run than if it is not the first one selected. In other words if I start the application and select this one function and compile and run it it takes 7 minutes to run (only timing the function exectution, not compile time, etc...). If I select it again (no recompilation done here) and run it it only take 1 minute to run. Also, if I restart the application and select one of the other functions to run first and then select the this one it again only takes 1 minute to run. I can run it several times after the first time and each time it only takes 1 minute. However, if it is the first function selected (after the applications is restarted) then it takes 7 minutes.

Any ideas on the cause of this slow performance the first time? In usual use there will only be one function selected to run and it will always be after an application restart which implies it will always take 7 minutes to run that function.
Nov 16 '05 #1
3 1083
Only one to find it out.
Post your code. This doesn't say much.

Kind regards

Alexander
Nov 16 '05 #2
I wish I could but it is currently company proprietary and the performance is not yet important enough to warrant providing it. I can tell you this much - all the functions do basically the same thing. They open an input file (or a few files), read in the data one record at a time, process it and write out result records to an output file (or few files).

However, I have continued to investigate this and have found the following. If the long running function is called first it allocates memory continually. It ends up allocating around 250MB of memory. The other functions don't do this and this function does not do it if it is not the first function called.

"Alexander Muylaert" wrote:
Only one to find it out.
Post your code. This doesn't say much.

Kind regards

Alexander

Nov 16 '05 #3
melvers <me*****@discussions.microsoft.com> wrote:
I wish I could but it is currently company proprietary and the
performance is not yet important enough to warrant providing it. I
can tell you this much - all the functions do basically the same
thing. They open an input file (or a few files), read in the data one
record at a time, process it and write out result records to an
output file (or few files).

However, I have continued to investigate this and have found the
following. If the long running function is called first it allocates
memory continually. It ends up allocating around 250MB of memory. The
other functions don't do this and this function does not do it if it
is not the first function called.


You don't need to post the actual code, necessarily. Post a short but
complete program which demonstrates the problem.

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: qvx | last post by:
Hi all, I have a performance problem in my app. It is a poor man's version of OCR app. I started this app as a prototype before implementing it in C++. But now, after I have a working copy in...
10
by: AC Slater | last post by:
I have 1 table (out of many) that has very poor performance when performing a select into on. The select statement is called multiple times. We've found each call to take almost 1 second... we...
1
by: Evan Smith | last post by:
My database is suffering from poor performance of late. Reports that used to run in a reasonable time, now take a while. The explain output show that the query is fully indexed, and the statistics...
3
by: sac | last post by:
I am using DB2 v8.1 on UNIX. At times the database shows extremely poor performance. I do not have dba/admin rights nor do I have the web based client for db2 v8.1. I have only command line...
4
by: Bill Thorne | last post by:
We have a COM object that has been wrappered for use in .NET and which can make calls which can take a while to execute. These are mainframe integration calls that might perform a lot of data...
20
by: John Mark Howell | last post by:
I had a customer call about some C# code they had put together that was handling some large arrays. The performance was rather poor. The C# code runs in about 22 seconds and the equivalent...
4
by: Jim Devenish | last post by:
I have converted an Access back-end to SQL Server back-end but am having some problems. The Access to Access application has been running well for some years. I have successfully copied all the...
1
by: Billy | last post by:
Hi All, I'm attempting to use the MapNetworkDrive <snippedbelow from entire code below with very poor performance results. Basically, I have very small 73kb text files that are rewritten daily...
4
by: joa2212 | last post by:
Hello everybody, I'm posting this message because I'm quiet frustrated. We just bought a software from a small software vendor. In the beginning he hosted our application on a small server at...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.