14.12.2016, 15:34
(
Last edited by corne; 17/12/2016 at 12:07 PM.
)
I've read through a few existing topics but found conflicting answers on this issue. I'm building an ingame map editor and now working on the ability to save a single map (the one you'd be editing) on command, the average map would have about 50 to 200 objects, with about 20 maps on the server.
Now, I'm trying to figure out whether it would be faster to loop through ALL objects and use strcmp to check the map name each time, and if it's the one you've edited then save them to the database id stored in a variable.
... or ....
Use MySQL in order to retrieve all ingame ids stored in a table, then loop through those and save them.
--
My guess would be MySQL as strcmp is quite slow, just interested in your opinions.
Now, I'm trying to figure out whether it would be faster to loop through ALL objects and use strcmp to check the map name each time, and if it's the one you've edited then save them to the database id stored in a variable.
... or ....
Use MySQL in order to retrieve all ingame ids stored in a table, then loop through those and save them.
--
My guess would be MySQL as strcmp is quite slow, just interested in your opinions.