Home | Reviews | GUIpedia | Forum | Fun500
HorvatM | A question on storing binary filesFor a binary file (OPEN x$ FOR BINARY AS #y), what do you think is more efficient - entry major, or field-major order - for a file that is going to have entries added and removed (not just edited) a lot and thus rewritten many times? | 2010-06-12 | 8:44 AM |
Brandon | Re:A question on storing binary filesOne large opening will be faster, assuming I understand correctly. For example: In my F5I icon format I read all 1024bytes at once which is much faster than reading the file pixel by pixel.
| 2010-06-12 | 9:01 AM |
HorvatM | Re:A question on storing binary filesThe file will be read all in one go, so the problem is more about adding or removing entries and then writing the file. | 2010-06-12 | 10:23 AM |
Brandon | Re:A question on storing binary filesWriting all at once will be faster than writing pieces at a time. | 2010-06-12 | 10:30 AM |
Todd | Re:A question on storing binary filesLike Brandon said, it's more efficient to have a larger buffer size. | 2010-06-12 | 1:40 PM |
Dick | Re:A question on storing binary filesDon't know much about this, but I'd assume the less disk I/O the better. So it should be faster to only write/delete what you need, but it might be tricky in some situations. Best way would be to try both and time your code.
QB also allows random access files.
http://en.wikipedia.org/wiki/Random_access | 2010-06-13 | 1:48 AM |
Todd | Re:A question on storing binary filesThe best way is to know how your file format works and seek to a specific block to read. | 2010-06-13 | 9:59 AM |
Other
2021 Brandon Cornell