So lets say that I create a new macro that I want to select the "mine (d)" command from the designate menu, start the designation, move upwards two tiles, and then end the designation. I'm going to name my macro "tester" in this case. Then when I open the tester.mak file in the macros folder I see this.
tester
OPTION4
CUSTOM_D
WORLD_PARAM_DELETE
LEGENDS_EXPORT_DETAILED_MAP
A_COMBAT_DODGE
A_STATUS_DESC
A_SLEEP_DAWN
A_INV_DROP
A_BARTER_CURRENCY_3
SETUP_NOTES_DELETE_NOTE
BUILDJOB_TARGET_RIGHT
BUILDJOB_BED_DORMITORY
BUILDJOB_FARM_WINTER
BUILDJOB_RACKSTAND_KILL2
HOTKEY_BUILDING_DOOR
HOTKEY_BUILDING_CONSTRUCTION_STAIR_DOWN
HOTKEY_BUILDING_WORKSHOP_DYER
BUILDING_ORIENT_RIGHT
BUILDING_ADVANCE_STAGE
BUILDING_TRIGGER_MAX_SIZE_DOWN
HOTKEY_GLASS_DOOR
HOTKEY_CARPENTER_DOOR
HOTKEY_MASON_DOOR
HOTKEY_TRAP_DOOR
BUILDJOB_STOCKPILE_DELETE_CHILD
STOCKPILE_ARMOR
STOCKPILE_SETTINGS_DISABLE
STORES_DUMP
ORDERS_DYED_CLOTH
ORDERS_ZONE_DRINKING
D_DESIGNATE
D_BURROWS_DELETE
D_NOTE_DELETE
D_NOTE_ROUTE_DELETE
D_BITEM_DUMP
D_LOOK_DUMP
ARENA_CREATURE_SIDE_UP
ASSIGNTRADE_SORT
DESIGNATE_DUMP
DESIGNATE_DIG
ITEM_DUMP
D_MILITARY_DISBAND_SQUAD
D_MILITARY_ALERTS_DELETE
D_MILITARY_AMMUNITION_REMOVE_ITEM
D_MILITARY_DELETE_UNIFORM
STRING_A100
End of group
SELECT
CLOSE_MEGA_ANNOUNCEMENT
WORLD_PARAM_ENTER_VALUE
SETUPGAME_SAVE_PROFILE_GO
D_BURROWS_DEFINE
D_MILITARY_ALERTS_SET
End of group
STANDARDSCROLL_UP
CURSOR_UP
A_MOVE_N
End of group
STANDARDSCROLL_UP
CURSOR_UP
A_MOVE_N
End of group
SELECT
CLOSE_MEGA_ANNOUNCEMENT
WORLD_PARAM_ENTER_VALUE
SETUPGAME_SAVE_PROFILE_GO
D_BURROWS_DEFINE
D_MILITARY_ALERTS_SET
End of group
CUSTOM_CTRL_R
End of group
End of macro
The majority of the "commands" given in each "group" (Notice the "End of group" tags? Each group is equivalent to one key press in the macro) are not needed, yet they still take up processing time for the game. When I use this macro I'm always going to be using the 'd' key to select mine on the designate menu, I'm never going to be using 'd' to delete a world parameter. Yet the game still tries to perform this command when I run the macro, slowing it down immensely. If I chop out all of the extra stuff recorded in the macro then it goes from what I had listed above down to:
tester
DESIGNATE_DIG
End of group
SELECT
End of group
CURSOR_UP
End of group
CURSOR_UP
End of group
SELECT
End of group
End of macro
See how much smaller that is? It even completely removes the "CUSTOM_CTRL_R" command at the end of the macro which is not needed. This will speed up the rate at which the game performs macros immensely, though it can be a little time consuming to edit larger macros. (The find/replace all tool is great for this, if every time you hit 'd' you want to select dig from the designations menu you can simply say find "huge list for the 'd' key" and then replace them all with DESIGNATE_DIG). Also one last side effect of doing this is if you accidentally activate the macro while you are on the wrong screen then it will do absolutely nothing! No more will you watch in horror as your "set up a military" macro offers away 2/3rds of your crafts because you accidentally activated it in the trade depot.