-
May 30th, 2014, 08:13 AM
#1
SteamWriter Problem - tooooo slowwwwwwwwwwwwwwww
Hello,
I am processing a large text file and making a lot of edits to it along the way and then writing it back using SteamWriter.
Unfortunately it is dog slow compared to VB6 and I don't know what to do about it. I am self taught occasional dabbler and need to keep things on the more basic level as well.
I am using VB.net Express 2010 and am wondering if some problems exist and are fixed in the 2013 version.
thanks in advance
-
May 30th, 2014, 01:57 PM
#2
Re: SteamWriter Problem - tooooo slowwwwwwwwwwwwwwww
Perhaps the slowness is due to your approach? Post the code using code tags so we can see what you're doing.
-
June 3rd, 2014, 06:35 AM
#3
Re: SteamWriter Problem - tooooo slowwwwwwwwwwwwwwww
Sorry for the late replay. I was expecting an email if there was any response here.
I scoured the internet and found a lot of dudes solving with with all sort of create methods that were too complicated for my novice brain. I eventually found another option for the steam-writer that seems to work faster. It was quite buried (to me anyway)
I think my clue came from here
http://books.google.ca/books?id=21Ft...Writer&f=false
This worked
Dim myoutputfile As String = lblFullPath.Text & "\" & "\Spinner\" & strfilename
Dim swrfile As System.IO.StreamWriter
swrfile = System.IO.File.AppendText(myoutputfile)
I did not keep my original code but my tutorial for my original code only seems be using the first line of this example (and then the write commands). My tutorial was Sams teach yourself - 2010.
-
June 3rd, 2014, 06:41 AM
#4
Re: SteamWriter Problem - tooooo slowwwwwwwwwwwwwwww
Wow, I really should read my stuff before posting. Please point me to an edit option if there is one to get rid of my typos.
-
June 4th, 2014, 12:30 AM
#5
Re: SteamWriter Problem - tooooo slowwwwwwwwwwwwwwww
I am curious how you were doing it before. I've not saw any issues using streamwriter. I would suspect it was related to your methods.
Always use [code][/code] tags when posting code.
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
|
Click Here to Expand Forum to Full Width
|