Quickest ES2 load method for (50) int/bool values?

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
ikars
Posts: 5
Joined: Fri Jan 10, 2014 4:06 pm

Quickest ES2 load method for (50) int/bool values?

Post by ikars »

Hi Joel,

Loving the ease of use of ES2, but I'm finding single load calls to be a bit slow for what I need to do --

So, my question is: which of the available ES2 Load Methods would give THE best performance loading roughly 50 variables?
All the values are int & bools so I could probably represent them all as int's if, say, (1) array would be the fastest. I don't suppose
this would make a difference, but writing speed isn't a concern in this particular case.

Thanks!
- Igor
ikars
Posts: 5
Joined: Fri Jan 10, 2014 4:06 pm

Re: Quickest ES2 load method for (50) int/bool values?

Post by ikars »

Did a little research while waiting for a reply -- seems like on the C# side I'd probably want to go with a Dictionary.
Here's a little study: http://blog.bodurov.com/Performance-Sor ... Hashtable/

Venturing a guess answer to my question -- wouldn't all the 'bulk' loading methods be pretty much equivalent in ES2
given that they are essentially fetching a single object?

Thanks again,
- i
User avatar
Joel
Moodkie Staff
Posts: 4852
Joined: Wed Nov 07, 2012 10:32 pm

Re: Quickest ES2 load method for (50) int/bool values?

Post by Joel »

Hi there,

A native array would technically be the fastest to Save and Load as it requires less overhead, but there wouldn't be that much difference. For reference, a 2009 iMac can save an array of 20,000 Transforms (position, rotation, scale, tag) in under 200ms.

Also with regards to saving ints and bools, there wouldn't really be much difference in performance if you saved the two arrays separately, especially if you take into consideration the cost of casting the bool to an int.

All the best,
Joel
ikars
Posts: 5
Joined: Fri Jan 10, 2014 4:06 pm

Re: Quickest ES2 load method for (50) int/bool values?

Post by ikars »

20k in 200ms sounds brilliant. Will give ES2.LoadArray a shot. Thanks, Joel :)
Locked