After some testing I realized that there is a data table maximum for some of the value types.
Text and String are effected by this max.
While Real and Integer arent. (actually I saved 2.4mill real value in data table)
The max for Text and String is 30,400-30,800 value. If you create new actor scope or use global or local, it wont matter it will still over flow at the same amount...
Also, it seems like its not effected by the amount variable and triggers you have in the map.
And it doesnt matter how long is your string or text.
(I made the tests on 1.5 beta)
I've made a test with the runtime of data tables. Save equals Set for me, so don't be confused with the used name here.
Every operation used integers. Times used are the ones of the native functions in 1.5 arcade beta.
Operations are executed in order. Used keys for init were "1ii", ..."200000ii" and for the testing entries the keys "1i", ... "100000i" were used.
Operation: used time (total time)
time after init of 200k other integers: 480ms (480);
saving 100k integers into new testing entries: 568ms (1048);
save: 90ms (1138);
save: 89ms (1227);
get: 86ms (86);
remove 104ms (104);
remove 406 (510);
remove 458 (968);
get 403 (489);
save 595 (1822);
save 89 (1911)
I've repeated the test with different keys (swapped number and letter positions). Used keys for init were "ii1", ..."ii200000" and for the testing entries the keys "i1", ... "i100000" were used.
time after init of 200k other integers: 496ms (496);
saving 100k integers into new testing entries: 583ms (1079);
save: 89ms (1168);
save: 99ms (1267);
get: 83ms (83);
remove 101ms (101);
remove 425 (526);
remove 402 (928);
get 405 (488);
save 597 (1864);
save 89 (1953)
Results of this test:
- both key usage variations didn't effect the speed.
- removing/setting/getting in unused entries: TERRIBLY SLOW
- removing/setting/getting in existing entries: FAST
Moral:
- avoid deleting entries,
- avoid using non existing stuff, try to reuse entries,
- consider saving entries in the data table to create the lag at map start instead of during the playtime
After some testing I realized that there is a data table maximum for some of the value types.
Text and String are effected by this max.
While Real and Integer arent. (actually I saved 2.4mill real value in data table)
The max for Text and String is 30,400-30,800 value. If you create new actor scope or use global or local, it wont matter it will still over flow at the same amount...
Also, it seems like its not effected by the amount variable and triggers you have in the map.
And it doesnt matter how long is your string or text.
(I made the tests on 1.5 beta)
I've made a test with the runtime of data tables. Save equals Set for me, so don't be confused with the used name here.
Every operation used integers. Times used are the ones of the native functions in 1.5 arcade beta.
Operations are executed in order. Used keys for init were "1ii", ..."200000ii" and for the testing entries the keys "1i", ... "100000i" were used.
Operation: used time (total time)
time after init of 200k other integers: 480ms (480);
saving 100k integers into new testing entries: 568ms (1048);
save: 90ms (1138);
save: 89ms (1227);
get: 86ms (86);
remove 104ms (104);
remove 406 (510);
remove 458 (968);
get 403 (489);
save 595 (1822);
save 89 (1911)
I've repeated the test with different keys (swapped number and letter positions). Used keys for init were "ii1", ..."ii200000" and for the testing entries the keys "i1", ... "i100000" were used.
time after init of 200k other integers: 496ms (496);
saving 100k integers into new testing entries: 583ms (1079);
save: 89ms (1168);
save: 99ms (1267);
get: 83ms (83);
remove 101ms (101);
remove 425 (526);
remove 402 (928);
get 405 (488);
save 597 (1864);
save 89 (1953)
Results of this test:
- both key usage variations didn't effect the speed.
- removing/setting/getting in unused entries: TERRIBLY SLOW
- removing/setting/getting in existing entries: FAST
Moral:
- avoid deleting entries,
- avoid using non existing stuff, try to reuse entries,
- consider saving entries in the data table to create the lag at map start instead of during the playtime
@Ahli634: Go
How do Data Tables affect overall performance? Memory usage?
Member since 2010. Made the -The Thing- [Revival] game. Nostalgic of the WC3 days.