Jump to content

why appending binary data is so slow


Recommended Posts

Hi, I'm reading a big binary file (more then 1GB), I want to extract some information from it (in this case just access time that stored in it beside many more information)

I'm using WinAPI & DllStruct For load file and read this binary file, every thing work as I excepted

except one thing, I'm appending all AccessTime binary data to a variable, that I want save to another file later, But the program is getting very slow after some time (i think the larger the variable, the slower the program)

here is only a example of what I Mean

GLobal MData = ""
;...
Local $Logs = Struct("UINT offset;UINT Size;UINT itemCount;UINT CHM;")
Local $AccessTime = Struct("UINT offset;UINT Size;UINT itemCount;UINT CHM;")
;...
SPos(DllStructGetData($AccessTime, "offset"))

For $i = 1 To DllStructGetData($AccessTime, "itemCount")
    $MData &= _nextValue("UINT;") & 0x00 & _nextValue("UINT;") & 0x00000000
    ;...
Next

that $MData var, get bigger and bigger after some time, and I think that slow down the program

what can I do to solve this problem?

Link to post
Share on other sites
  • Jos locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...