1. Yes, WHEN/ENDWHEN loop is slower then *RUNALLOCATION but you have no other option - there is no conditional allocation...
2. The only effect of *COMMIT with WHEN/ENDWHEN calculations - is scope reset to original script scope. Data is written to database at the end of WHEN/ENDWHEN loop automatically.
*COMMIT is equivalent to
*XDIM_MEMBERSET TIME=%TIME_SET%
*XDIM_MEMBERSET ENTITY=%ENTITY_SET%
...
If you want to reset scope for some dimensions to original script scope - it's better to use *XDIM_MEMBERSET DIMNAME=%DIMNAME_SET% instead of *COMMIT for all dimensions.
And when I am talking about MDX calculations - I am talking about syntax like:
[P_ACCT].[#CE0661000] =[P_ACCT].[CE0004010]/[P_ACCT].[CE0652000]
For this type of calculations COMMIT actually write data to the cube. But MDX calculations are very slow!
Vadim