Further ideas for import performance improvement
Rewrite the import process using Java so prepared SQL statements can be used with SQLite. Can use https://bitbucket.org/xerial/sqlite-jdbc/ as the SQLite connector.
Not sure if the work is worth the potential benefit though. Slowest part is still the lookup of comments when storing questions/answers.
An alternative idea is to lookup comments on retrieval instead, storing them separately (either in SQLite or Solr). This however, means comments are not indexed (they are currently).