MR-linacs are a new radiation technology that creates personalized treatments which can be adapted to account for daily changes in a patient’s tumor and normal anatomy. This has the potential to reduce side effects, but long treatments limit patient throughput and cause tumor motion during treatment delivery. To avoid underdosing the tumor an extra margin is added and planned to receive the full prescription dose. However, this methodology leads to higher doses for healthy tissues as well. This work evaluated a new algorithm that creates radiation treatment plans more quickly, and which also delivers faster than the current clinical standard. This combination reduces the total plan creation and delivery time by 35.8 % in prostate cancer patients. Even with more efficient treatments tumor motion can still occur during treatment. Our work developed a method to study the impact of this tumor motion and to determine the extent of margin reduction which can safely be applied. Additionally, we simulated a method that can adapt a patient’s treatment in near real time to counteract this tumor motion. Our work shows that 2 mm margins are feasible when treating cancerous lymph nodes and prostate cancer without risking underdosage. This led to better sparing of healthy tissues as compared to the current clinical standard. For lymph node treatments this margin reduction led to a 27.4 % decrease in the maximum bowel dose. Our work advances MR-linac technology by improving treatment efficiency and better sparing healthy tissues with the aim of reducing patient side effects.