-
VB.NET binary file access using FileGet/Put is slowwww...
Ok, I am using some old VB6 style Put/Get statements to read/write binary
files using structures in VB/NET. This structure is defined like this for
VB.NET:
Public Structure COGO_PT
Dim ID As Byte
Dim PT As Short
<VBFixedArray(20)> Dim DESC() As Byte
Dim NO As Double
Dim EA As Double
Dim EL As Double
End Structure
Opening a 3meg file and saving it to another file in VB6 takes about 2 seconds
on my P800mhz. The same operation in VB.NET (in which the file access function
is virtually identical to the VB6 code) takes almost 30 seconds! The file
access is generally 10-20 times slower than the very same VB6 code? Should
I be using the Binary stream reader? Am I doing something wrong with this
structure definition?
Any help would be appreciated,
Tannks,
Terry
-
Re: VB.NET binary file access using FileGet/Put is slowwww...
> Ok, I am using some old VB6 style Put/Get statements to read/write binary
> files using structures in VB/NET. This structure is defined like this for
> VB.NET:
I would personally recommend using the .NET Framework System.IO namespace to
do this. All the Put/Get VB.NET calls do is wrap the .NET functionality.
> Opening a 3meg file and saving it to another file in VB6 takes about 2
seconds
> on my P800mhz. The same operation in VB.NET (in which the file access
function
> is virtually identical to the VB6 code) takes almost 30 seconds! The file
> access is generally 10-20 times slower than the very same VB6 code? Should
> I be using the Binary stream reader? Am I doing something wrong with this
> structure definition?
I am not sure it is your structure. I would be more curious to see your IO
code or at least the portions that you can show.
I haven't had to do a lot of File IO in .NET yet as I haven't need that
functionality so maybe a few that have had extensive use with it can pop by
and give their recommendations.
Regards,
Cal
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks