473,796 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1100
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*****@discus sions.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.co m>
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
2624
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 Python, I don't feel like doing the job again in C++. A speed improvement of at least 5 times would be necessary (I have to process several hundreds of thousands of images). The application works like this:
10
3986
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 were expecting less than .1 seconds. The select stmt looks like: select key,data into key_buff, data_buff from tablename where key > curr_key AND key < max_key ORDER by key FETCH FIRST 1 ROW ONLY;
1
2444
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 are up to date. Using a statement monitor I was able to determine that a particular query took 545 seconds of real time to run, yet only 19 seconds of CPU. According to my system monitoring tools, I had plenty of idle CPU cycles and free memory...
3
5269
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 access. Also DBA support starts after our jobs have completed. (1) Is there any command that I could use from command line to find out the process taking up maximum of the database resources ? (2) Can the database snapshot be used for this purpose ?...
4
1785
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 entry and gathering, returning the results to the ASP.NET caller. I have tried an AsyncPage class (implements IHttpAsyncHandler and uses custom thread pool class from DevelopMentor.ThreadPool -http://staff.develop.com/woodring); I have tried the...
20
2124
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 C++.Net code runs in 0.3 seconds. Can someone help me understand why the C# code performance is so poor? I rewote the C# code to use a single dimenional array and the time went down to about 3 seconds, but that's still no explaination as to why the...
4
2690
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 data to SQL Server and linked the tables to the front end .mdb (I am not using .adp). Some queries were performing poorly so I have converted these to Views and linked to them. Everything works well with good response but when about 8-10...
1
3900
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 to a network share using the MapNetworkDrive command to connect to the valid \\servername\share path. After successfully connecting the drive in the ASP code, the text file
4
2403
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 his office. I think it was a Fujitsu-Siemens x86 running debian Linux. The performance of the DSL-Line was very poor, so we decided to buy an own machine to host the application ourselves.
0
9529
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10013
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6792
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5576
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4119
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3733
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2927
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.