Cherry pick performance improvements and simple merge request API changes to 9-4-stable
This MR is just three cherry-picked merge commits in the right order to the 9-4-stable
branch:
This is needed for the Trello power-up integration we want to ship in 9.4.
Edited by James Edwards-Jones