How to deal with many files
Posted: Thu Nov 23, 2023 2:53 pm
Okay livecodinians, I am working on a game that is going to have a fair amount of graphics and sounds clips. It will be necessary to download more of each as things progress. I don’t have an exact number, but the initial count is over 500 files at around 250MB, though I am trying to shrink the size.
So, I'm looking for speed, flexibility and I am trying not to be a memory hog
I’m trying to decide what would be the best way to keep and maintain all this. My thoughts are:
1. Store everything as individual files in a directory. - Really don’t like it, but that’s an option.
2. Save to an external stack. Seems like it could take a long time to load, but it would be easy to call up images as needed.
3. Save to multiple external stacks. I could make a number of smaller stacks which I could load in as needed instead of all at once. Can anyone think of a downside?
4. Sqlite database. Honestly have no idea how much this would take up in time and resources. With the stacks, they have to be loaded in memory, but does a sqlite DB have the same issue?
5. Is there some way to create smaller archives that can be opened as needed, like a zip file or something similar?
Any opinions or suggestions?
So, I'm looking for speed, flexibility and I am trying not to be a memory hog
I’m trying to decide what would be the best way to keep and maintain all this. My thoughts are:
1. Store everything as individual files in a directory. - Really don’t like it, but that’s an option.
2. Save to an external stack. Seems like it could take a long time to load, but it would be easy to call up images as needed.
3. Save to multiple external stacks. I could make a number of smaller stacks which I could load in as needed instead of all at once. Can anyone think of a downside?
4. Sqlite database. Honestly have no idea how much this would take up in time and resources. With the stacks, they have to be loaded in memory, but does a sqlite DB have the same issue?
5. Is there some way to create smaller archives that can be opened as needed, like a zip file or something similar?
Any opinions or suggestions?