Arsip: Ukuran Buffer optimal untuk pemrosesan file > 50 MB

 
user image
more 16 years ago

pebbie

Guys, mo tanya bwt yang pernah menghadapi pemrosesan file berukuran > 50 MB pake TFileStream. Strategi yang gw pake bacanya per-chunk berukuran X bita. Nah, pertanyaannya berapa ukuran X yang optimal biar prosesnya jadi cepet. gw coba 1024 sama 8192 cuma beda 1 detik doang (ukuran file masukannya 50MB). anggap filenya biner dan prosesnya cuma dibaca per byte. gw pake delphi7 di XP. strategi lain yg lebih efisien kalo punya juga boleh.. :D thx b4
user image
more 16 years ago

dels

buffer paling kenceng itu $FFFF, tp untuk mencegah Buffer Overflow dosisnya bisa kita turunin jadi $8000 bisa jg di paksa semisal 1024 1024 cuma saya ga pernah sukses, biasanya selalu ada Access Violation klo pake 1024 1024
user image
more 16 years ago

pebbie

sip-sip.. dicoba dulu.. gpp yah pake buffer ukurannya gede (32K, 64K, 1M)?
user image
more 16 years ago

pebbie

uh.. pake $100000 stack overflow.. dah gw coba macam-macam dosis

  BUF_SIZE = $80000;//512K, t: 56578ms
  //BUF_SIZE = $40000;//256K, t: 56984ms
  //BUF_SIZE = $20000;//128K, t: 56750ms
  //BUF_SIZE = $10000;//64K, t: 57531ms
  //BUF_SIZE = $1000;//4K, t: 57250ms
  //BUF_SIZE = $2000;//8K, t: 57438ms
  //BUF_SIZE = $4000;//16K, t: 56890ms
  //BUF_SIZE = $8000;//32K, t: 59406ms
  //BUF_SIZE = $FFFF;//64K, t:57484ms
ngitungnya pake gettickcount doang. hmm.. nggak terlalu ngaruh juga y.. :D kyknya mesti ganti harddisk..
user image
more 16 years ago

_aa_

gak ngaruh, lagi.. itu urusan OS fs buffer berukuran 4KB di win32, 8KB di Win64
more ...
  • Pages:
  • 1
Share to

AI Forward

🚀 We're thrilled to partner with Alibaba Cloud for "AI Forward - Alibaba Cloud Global Developer Summit 2025" in Jakarta! Join us and explore the future of AI. Register now: https://int.alibabacloud.com/m/1000400772/
#AlibabaCloud #DeveloperSummit #Jakarta #AIFORWARD

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com