<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0mm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:10.0pt;color:#204A87'> </span>I have just pushed a somewhat radical change to databaseReset.py and I hope no one gets too upset. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>It does the requested import to a scratch in-memory sqlite database (5.6 mins for the entire import) and only then does it do the import you requested.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Since most of the runs of databaseReset are by people debugging code or finding errors in input data this should save time overall quite a bit as the errors are found during the scratch in-memory phase.<o:p></o:p></p><p class=MsoNormal><br>The reason for doing this is because I am looking forward to a long period of fixing python 2to3 errors which will undoubtedly mean running all the import code hundreds of times.<br><br><span style='font-size:10.0pt;color:#204A87'><o:p></o:p></span></p><p class=MsoNormal><b><span style='color:#204A87'> </span></b>..and if I wrote the planned extension of skipping the full python file import to the db and squirting the SQL generated by the in-memory phase into the db instead – in a single transaction - the entire operation would be much quicker under all circumstances.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Philip<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>PS Working on the import and the parsers is my way of learning how the db is constructed out of the input data files. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I think I have determined that the “surveyimgs” option : <o:p></o:p></p><p class=MsoNormal>parsers.surveys.parseSurveys(logfile=settings.LOGFILE) <o:p></o:p></p><p class=MsoNormal>does nothing functional at all and that this code is not in active use but kept around in case any bits might be useful. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The survey scan image files actually used in troggle are imported by parsers.surveys.LoadListScans().<o:p></o:p></p></div></body></html>