473,480 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Improving perf of .NET 1.1 app that opens hundreds of files...

I have a VB.NET 1.1 app that must open/reopen and read hundreds (or sometimes
thousands) of large, multi-GB files and create one extremely large output
file (this is seismic data). I'm using the FileStream class for reading and
writing.

I need to improve its performance, so I first thought I would add my own
app-level buffering on the read-side. But that made it slower (and then I
realized that FileStream already did buffering...duh!)

Next I tried implementing a cache of open FileStream objects. In creating
its output, the app must close and re-open the same input files repeatedly
(extracting different data each time), so I was thinking that I could keep
some number of previously-opened FileStream objects (or references thereto)
in a list, in order to reduce the amount of closing/re-opening. But
surprisingly, that change also made the app slower. It's almost as if the CLR
or NTFS or Win (XP) is keeping recently-opened files - or at least
information about the files - around for a while, so when you re-reference
them, the re-open occurs very quickly (any opinions on whether this
conclusion is true???)

After a couple of weeks of experimentation and performance tests (and posts
to this and other ng's), I'm running out of ideas on how to make this app run
faster.

ANY advice would be greatly appreciated!

DT
Oct 17 '06 #1
1 1278
Hi David,

I’m guessing that you are running into a page fault problem. Run your
application and then open Task Manager.

1. On the Processes page select your application.
2. If you can’t see the Page Faults counter then...
3. From the File Menu select View -Select Columns and make sure the Page
Faults check box is checked.
4. Return to the Processes page and watch what is happening.

As your application is running if the Page Faults are going up steady and
quickly that is likely where your problem is.

Read this article for an overview of how files are read into memory:
http://www.microsoft.com/technet/pro.../wperfch7.mspx

If you have a page fault problem you have a couple choices to reduce the
number of page faults: change the software, upgrade the hardware, or both.
The choices available to you to programmatically reduce page faults are
application dependent. But basically you want to do as little file opening
and closing as possible. Especially with these large files. As for
hardware, you can load up on RAM, get a really fast hard drive, and make sure
that your buses are fast. The memory is pretty inexpensive these days, but
the bus is on the motherboard, so you maybe looking at a new machine.

Hope that helps you,

Kim Greenlee

--
digipede - Many legs make light work.
Grid computing for the real world.
http://www.digipede.net
http://krgreenlee.blogspot.net

Oct 17 '06 #2

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

Similar topics

1
2797
by: ME | last post by:
http://www.codefoot.com had this; but can someone give me a clue? JavaScript: Invoking The SaveAs Dialog From A Web Page Re: damn, word doc opens by default, onclick event or similar needed ...
15
1541
by: Raj | last post by:
Hello all: We have a table with about 2400 cells. Our requirement is to highlight the cells in the table whose data has changed, every 5 seconds. Our script behaves relatively ok in Firefox, but...
3
2591
by: Joshua Coady | last post by:
Do Trace calls have any impact on performance if Trace is disabled in the config file? Josh
11
3452
by: Pohihihi | last post by:
I was wondering what is the ill effect of using try catch in the code, both nested and simple big one. e.g. try { \\ whole app code goes here } catch (Exception ee) {}
11
1272
by: perspolis | last post by:
Hi all I have a application that connects to a sql server database. I have many rows about above 100,000 records and when I want to fill my sqlDataAdaptor and show results in a grid it takes above...
2
1477
by: David | last post by:
We've developed a seismic-data processing app in VB.NET 1.1 which runs on XP Pro using SQL2K. Like all seismic data apps, it deals with HUGE amounts of binary data (we use NTFS sparse "flat...
2
5262
by: Stefan Kuhr | last post by:
Hello everyone, I hope this is not an FAQ and that somebody can answer this: As part of our webservice installation we run aspnet_regiis.exe -ir -enable on computers where the web...
1
1488
by: Ben | last post by:
Hi, I registered some custom perf counters that i want to use in my app (all of type NumberOfItems32). I added them under the same category name but different counter names... Same code work...
32
3760
by: Pedro Borges | last post by:
Hi guys, Is there a way to improve the interpreter startup speed? In my machine (cold startup) python takes 0.330 ms and ruby takes 0.047 ms, after cold boot python takes 0.019 ms and ruby...
0
6904
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...
1
6735
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...
0
6895
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
5326
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,...
1
4770
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...
0
2977
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1296
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 ...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
176
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...

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.