|
-
Jan 10th, 2015, 06:40 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] Why is reading a File in chunks quicker than in one go?
Hello,
I stumbled upon something that's making me think now..
Previously, the program was Loading chunks from the files by
opening them as Binary, and reading chunks off:
Code:
Get #fFile, xPos + 1, RAMBuffer
This was pretty fast. 90 files took 5 secs to load.
But the problem was, since its using the Native OPEN statement it doesn't seem to handle Unicode paths.
So if a user is using German, Chinese Windows etc... the Path to the File would contain Unicode, hence error!
So I thought, why don't I instead Load the File all at Once [via CreateFile] in to a String Buffer and then using mid$() to split chunks out to strings. Now this takes almost 3x the time 16 seconds to complete :/
I thought doing things in Memory should be quicker than reading off of the HD in a loop ?
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

Tags for this Thread
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
|