Okay, there are few functions:
that aparently clear fields of a hashtable.
If I do:
will it be the same as when I do:
(If I didn't have any other things saved in the hashtable)
Or will it be less effective?
The answer to this question will determine how will I be cleaning 1 of my hashtables from here on.
Tho, I have 1 more question:
If I have 5 values saved in a child hashtable, will it be faster if I used "ClearChildHashtable" or it wouldn't matter if I use 5 times "RemoveSavedInteger"?
I'm kind a asking this, because I have a hashtable, that uses units' Handles, and until now I was keeping track how many triggers are using this unit's table at the moment, and when they become 0 - I was clearing it.
But now I can clear only the fields that I don't need, so I wouldn't need to track how many triggers are using it, so things become much simpler - I just remove the values the expired trigger needed.
So I'm just wondering if this will have any impact on the performance.
JASS:
native RemoveSavedInteger takes hashtable table, integer parentKey, integer childKey returns nothing
native RemoveSavedReal takes hashtable table, integer parentKey, integer childKey returns nothing
native RemoveSavedBoolean takes hashtable table, integer parentKey, integer childKey returns nothing
native RemoveSavedString takes hashtable table, integer parentKey, integer childKey returns nothing
native RemoveSavedHandle takes hashtable table, integer parentKey, integer childKey returns nothing
If I do:
JASS:
call SaveInteger(udg_Table, 0, 0, 1)
call RemoveSavedInteger(udg_Table, 0, 0)
JASS:
call SaveInteger(udg_Table, 0, 0, 1)
call FlushChildHashtable(udg_Table, 0)
Or will it be less effective?
The answer to this question will determine how will I be cleaning 1 of my hashtables from here on.
Tho, I have 1 more question:
If I have 5 values saved in a child hashtable, will it be faster if I used "ClearChildHashtable" or it wouldn't matter if I use 5 times "RemoveSavedInteger"?
I'm kind a asking this, because I have a hashtable, that uses units' Handles, and until now I was keeping track how many triggers are using this unit's table at the moment, and when they become 0 - I was clearing it.
But now I can clear only the fields that I don't need, so I wouldn't need to track how many triggers are using it, so things become much simpler - I just remove the values the expired trigger needed.
So I'm just wondering if this will have any impact on the performance.