Do group actions tag as they go, or only at the end?

I have an action that is rather long and involved, with several replace, regex's, format values, etc... on a few different tags. When I apply this on m4b files it really takes a long time.

Was just wondering if each action triggers a tag write operation. For instance...
Format value "FOLDER_NAME": %album%
Regular expression "FOLDER_NAME" regex1
Regular expression "FOLDER_NAME" regex2
Format value "FOLDER_NAME": %FOLDER_NAME% - %artist%

Will this cause folder_name to get written to the file over and over again? Or, does mp3tag proceed to the end, figure out what the ultimate value of FOLDER_NAME is going to be, then write it only once?

If it's writing over and over again that would account for why it's taking so long. I suppose I could try and consolidate/combine as many sub-actions as possible.

As you can see I'm sort of breaking this down procedurally. What I'd really like it to have a scratch variable to write to, then apply it as a tag at the end.

There is no variable called

of if you use it, then it is a user-defined one.
Which would also mean that the file itself has to be touched each time as the variable is sought in the tag data.
And then it could be that the tag data has to be re-written as the padding is not big enought.

If you really refer to the variable %_directory% which references the current folder name then this is a call of OS functions which really only manipulates the folder name - and that should be done fairly quickly.

Also, see here: