This appears to have been due to this issue in projectile, which I use.
I followed the suggestion in a comment on that issue of using this workaround:
(if (locate-dominating-file default-directory ".git")
.emacs and replacing it with the above code, and performance is now acceptable (there is a lag on opening the file, and on the first keypress that makes an edit to the file, as I would expect). This does mean that projectile is only activated in git projects, but that's fine for me - and the same workaround can easily be extended to other version control systems if necessary.