XML vs Array - performance in data interaction

Discussion and feedback on Construct 2

Post » Sun Jul 01, 2012 11:55 am

Hi there,

I recently discovered the XML object when I was starting a new project for a JRPG turn based combat demo. Without knowing the limits of that feature, I already like the sound of it being there. Sorting out RPG data like spells, abilities and what not will be a breeze.

I'm wondering though, if I have a large XML file with a list of all, say, spells in my game, is it faster to read straight from the XML file using the parse expressions, or preload all the XML data into the ingame array and retrieve data from the array, or will neither make much difference?

Different data that has to do with different aspects of the game, such as triggered events, spells, abilities etc, should they come in one large xml file or be split into multiple files?
B
19
S
6
G
1
Posts: 116
Reputation: 2,730

Post » Sun Jul 01, 2012 12:08 pm

Unless you continuously read thousands of items per second, performance of either way is not going to be important.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Sun Jul 01, 2012 1:11 pm

Thanks Ashley. Sounds like performance won't be a concern for text-based data retrieval then.
B
19
S
6
G
1
Posts: 116
Reputation: 2,730


Return to Construct 2 General

Who is online

Users browsing this forum: hollowthreat, Solomon and 8 guests