I have started working on a new project where im loading data from textfiles which is used to create the gameworld but I noticed a very strange slowdown. At one point in the loading, im searching a directory for all the the files in that directory and that process is incredibly slow on both my phone and tablet.
This is the code im using to find all the files:
std::string file = agk::GetFirstFile();
while(file.compare("") != 0)
{
segNames.push_back(file);
file = agk::GetNextFile();
}
Executing that code once takes about 0.24 seconds on my tablet and 0.05 seconds on my phone. It's acceptable on the phone but 0.24 seconds seems way to high. Loading all the data in the text files (about 30 lines) takes 0.01 seconds on the tablet and 0.001 seconds on the phone.
I have not tested it on any other platforms since im running linux right now...
Are there any faster ways of doing this, or any way to fix the current slowness?
Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy