Solved

How to reduce the processing time of a C# application that merges tif image files using VS2010 with .Net Framework 4.0 ?

Posted on 2016-09-12
6
53 Views
Last Modified: 2016-09-16
I am developing a C# application using VS2010 and .Net Framework 4.0

I have attached my C# code.

Basically I am reading a directory that has over 10,000 check images.
For each check, there are 2 check image files (front side of check and back side of check):   XXX represents the filename.  
XXX._Front.TIF
XXX._Rear.TIF

I have a function named "ProcessDirectory" that retrieves each check's file name and then calls a function titled "ProcessImage"
which merges the front check image file and back check image file into 1 check image file per check that shows the front check image on the top and the back check image on the bottom of the merged file.

This executable takes over 90 minutes to run. Can you think of a way to reduce the processing time by modifying the code?
0
Comment
Question by:zimmer9
6 Comments
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 41795095
What code?
0
 

Author Comment

by:zimmer9
ID: 41795100
0
 
LVL 80

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 41795239
90 minutes per image or 90 minutes to process 10K images? Have you profiled your code to see where it is bogging down? What are your disk queue's like? How many iops do you have available? (read/write to an SSD might help). What is your cpu percentage?  Lots of free memory?
Why still using VS2010?
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:zimmer9
ID: 41795243
90 minutes to process the 10K images.
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 41795391
Have you profiled your code to see where the most time is being spent?
0
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 41802356
Also have you tried to go multithreaded?

eg:
get a distinct list of the check images
then pass to a thread to with the file name to do the actual processing.
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What Does This C# Code Block Do? 5 53
JSON Deserialize issue 6 26
Convert Ctime to date time in textfile? 7 28
Vb.net threads keep increasing 2 35
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question