Adapt videos to the viewing environment
Consider several formats (size, frame rate, audio compression, etc.) depending on the bookContext in which the videos will be watched (desktop computer, WiFi tablet, EDGE smartphone, etc.).
Videos should be optimized outside of the website, ideally during post production. If that is not possible, use services like YouTube or Vimeo which offer, as standard, several optimized formats (SD, HD, etc.).
Avoid running SQL queries inside a loop
SQL queries inside a loop seriously hinder performance, especially if the SQL server(s) are not on the local machine. That is because these servers are designed to handle several selections, insertions or modifications in one single query or transaction.
Wrongly used, these queries unnecessarily consume CPU power, RAM and bandwidth.