473,396 Members | 1,738 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,396 software developers and data experts.

C# Batch Process Program Slows Dramatically Over Time

I've created a program that will create zips and exes of all the
product downloads on our website (mostly clipart and PowerPoint
templates, around 6000 total), but the program slows down dramatically
after the first few minutes. The process never gets above 24meg, all
child processes called are properly closed when they are done. I've
checked the GDI Objects for each process in Task Manager and none of
them get above 84 (that process is the UI for the program).

Simple rundown of the program flow:

1) Program checks user defined directory for a specific file type
(either PNG or POT) and creates an array of file names.

2) Program iterates through array and creates a zip file (using CLI
Winzip) that contains the POT or PNG along with a readme and eula txt
file. After the zip file is created, the program then creates a self
extracting archive (exe) using seabuilder from that zip file.

3) Program moves on to next file in array.
Each process call for WinZip and SEABuilder is terminated when the zip
or exe has been created.

I've noticed the slowdown most after the 40th file is created (usually
within the first minute). When left running long enough (a few hours),
the program can slow to the point where it is only making 5 zips/exes
every minute.

I've tried revamping the code a bit, but nothing seems to make much of
a difference. Can anyone give me a hint as to where to start looking
for leaks and/or performance issues?

Thanks,

Jason

Aug 11 '06 #1
2 2746

"JBudge" <jb****@gmail.comwrote in message
news:11**********************@74g2000cwt.googlegro ups.com...
I've created a program that will create zips and exes of all the
product downloads on our website (mostly clipart and PowerPoint
templates, around 6000 total), but the program slows down dramatically
after the first few minutes. The process never gets above 24meg, all
child processes called are properly closed when they are done. I've
checked the GDI Objects for each process in Task Manager and none of
them get above 84 (that process is the UI for the program).

Simple rundown of the program flow:

1) Program checks user defined directory for a specific file type
(either PNG or POT) and creates an array of file names.

2) Program iterates through array and creates a zip file (using CLI
Winzip) that contains the POT or PNG along with a readme and eula txt
file. After the zip file is created, the program then creates a self
extracting archive (exe) using seabuilder from that zip file.

3) Program moves on to next file in array.
Each process call for WinZip and SEABuilder is terminated when the zip
or exe has been created.

I've noticed the slowdown most after the 40th file is created (usually
within the first minute). When left running long enough (a few hours),
the program can slow to the point where it is only making 5 zips/exes
every minute.

I've tried revamping the code a bit, but nothing seems to make much of
a difference. Can anyone give me a hint as to where to start looking
for leaks and/or performance issues?
Since this is really a script, the problem is likely not in C# code.
Instrument the code to take timings for each step in the process and see
where the slowdown occurs. You can start by just outputining the timings to
the console.

David
Aug 11 '06 #2
An interesting problem, but I'm not sure that there's enough there to start
looking for lag... unless you are constantly adding anything to a collection
somewhere? debug info perhaps? (but then I would expect memory to
increase...).

From a very similar project I know it is possible... in a quick test using
of my code (using SharpZipLib [not WinZip], and without the SEABuilder step)
I measured 1066 zip creations in 47s (working on a tree of 1478 files in 267
folders [i.e. some get larger when zipped, so left "as was"], going from
100MB to 39MB).

So I may be able to assist given more information - unless SEABuilder is the
issue... (which sounds unlikely if the processes are being cleanly exited).

Marc

Aug 11 '06 #3

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

Similar topics

6
by: Larry R Harrison Jr | last post by:
I have a database I'm designing in Access 97. I have a custom field in a query which looks in {Table of Documents} and shows them all. It then needs a "latest revision number," stored in another...
0
by: Leo Heska | last post by:
Hi I haven't seen the following problem mentioned anywhere We have an application written in VB.NET which executes a batch file (named startJob.cmd). We have discovered that if that batch file...
1
by: Bucky Pollard | last post by:
I have a web service that needs to create a batch file and call it (since there are no APIs for the functionality I am looking for). I am using the Process and ProcessStartInfo objects. When I try...
6
by: Charles Neitzel | last post by:
I'm trying to write a windows application in C# (Using Microsoft Visual C# 2005 Express) that is nothing more than a simple UI with buttons on it. The buttons do various things like running...
1
by: Charles | last post by:
I'm trying to write a windows application in C# (Using Microsoft Visual C# 2005 Express) that is nothing more than a simple UI with buttons on it. The buttons do various things like running...
4
by: Shiraz | last post by:
Hi I'm using Visual Studio Installer to make my installer, and have not as yet figured out a straightforward way to use it to set environmental variables. Amongst the various things I tried, I'm...
3
by: emman_54 | last post by:
Hi every one, I am trying to run a batch file using my asp.net application. I am using the Process class to run the batch file. When I run my web application, In the task manager, i could see...
4
by: ed | last post by:
Hi all, I'm very new to vb (2nd day) and I need to create a small app that will replace my old batch file with a flashy gui. I had some experience with access 2.0 which helps ;) What I would...
14
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, In my windows applicationm, i need to excute a batch file. this batch file throws some text and questions to the screen, i need to catch the standard Output, check if it's a question, in...
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
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.