Now, i reprogrammed the routine. I like to like to use a GPX file (XML file with geographical waypoints) as database with about 2000 waypoints inside. For faster find all waypoints i write a separate index file where i can find the startoffset of each waypoint in the GPX file.
I wrote a loop reading in 30KB segments (with the FileGet command), analize it and write the founded startpoints with Binaryfile.dll directly to the new file. To find 2000 waypoints in a 14 MB XML file i need about 1 Minute on my iPaq. The old routine with FileGet needs for the same thing more then a quarter hour !!!
When i start my appli the next time, i just have to readin the indexfile in a Array (will go some milliseconds) and my application is ready again. Now, i can use my programm also for 5000 or 10000 waypoints without any speedlost. Only the first startup for index building will go a little bit longer.
Not kind understand your problem but I have experience in handling same big data file problem when using other development language. Using index file is a good solution but it require the development language with random access capability.
Here is the hints that may help.
1. In the index file, you record the data position in terms of bytes for each GPS point, e.g. myhomegps starts at 1353203 byte
2. As show in the help sample, use the following code to retrieve result from the big data file.
b = FileGetByte (c, 1353203) 'returns the 1353203 byte in the file.
as example to save the file position for 2000 Waypoint with an Int32 array, i need 8 KB of memory. This is a very small size i think and can be handled very easy. With the binaryfile.dll i can read or write the whole array from/to a file with one command.
I like the appl. BeeLineGPS very well for geocaching, but this apply read in the whole GPX database. If i have 2000 waypoints, the appli need about 20 MB of system memory. With 2500 Waypoints the appli crashes during startup. This is the reason why i write my own Geocacher Application with extrem memorysave code as we have learned with older computers. Remember that a Commodore 64 works with 64kb overall RAM. Now we use 64KB to store 1 string in a text variable