Big slow string properties

We implemented a site where people can build html-formatted documents and store them in the database, and of course the users abused it and embed multiple gifs into their pages and grind the up/download to a halt. (20-60 MB)

Hoping for ideas to improve speed - the html is currently stored in string params of standard dtos, and in varchar(max) in the database

The obvious improvement would be to move them out of the database, save a reference to the generated assets on the file system instead or use an object storage like AWS S3 or Cloudflare R2 which is my personal preference.

If documents can be archived after they’ve finished with them you can implement archive functionality to move them to a different database so they’re off your main working database.