Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Dimension
22
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 19th Jul 2010 07:30
I'm working on a program to read and write arrays but I noticed that my program only can write about 1mb every 10 seconds and my hard drive is supposed to be able to write 100mb/s. Does anybody know why this is?

Benjamin
23
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 19th Jul 2010 08:07
DBPro's file commands are notoriously slow if I remember correctly.
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 19th Jul 2010 09:59
As you are writing 1 byte at a time, you are actually performing 1 million loops of your code to write 1 megabyte. That's very different to taking a megabyte of data and dumping it into memory or disk.

It would be better to create a memblock, write all your data, then write the memblock to disk in one go.

Dimension
22
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 19th Jul 2010 10:26
Ok, thank you I'll give it a try.

Login to post a reply

Server time is: 2026-07-25 07:54:20
Your offset time is: 2026-07-25 07:54:20