16
Programs / Re: A skeleton code for Text Scroller via Drag-and-Drop
« on: March 14, 2022, 04:45:19 am »
Very interesting thread! Thank you!
I am regularly working with really big files (some over to 100GB) and have been optimizing 2 functions to read/process big files very fast.
I thought I'd add them here for information:
and for csv's:
I am regularly working with really big files (some over to 100GB) and have been optimizing 2 functions to read/process big files very fast.
I thought I'd add them here for information:
Code: QB64: [Select]
and for csv's:
Code: QB64: [Select]
- 'Print "Reading lines from "; fileName$; " ";: cpos% = Pos(0) '@@ progress info
- ff% = FreeFile
- sep& = 0
- lines& = -1
- buf$ = block 'Mid$(block, InStr(block, Chr$(10)) + 1)
- r0& = 1
- ' Process lin$
- lines& = lines& + 1
- 'Locate , cpos%, 0: Print lines&; '@@ progress info
- Next curblock&
- Close #ff%
- buf$ = ""
- 'Locate , cpos%, 0 '@@ progress info
- CSV.read& = lines&