Fix bug with "import snapshot" and greatly increase rendering speed on Linux

I'm getting much faster rendering speed on Linux due to these changes, and I haven't found any cases where they cause rendering to be invalid.