After further investigation I found out that it is the deletion of "QXmlQuery query" that takes ages. Wysota's tip for moving declations outside the if clause gave me the hint that it could be some destruction (when leaving the if) that is taking such a long time. I moved (byteArray, buffer, sourceDocument and query) declarations to the beging of my method and changed the creation of "QXmlQuery query" to "QXmlQuery* query = new QXmlQuery();". I now see that
//Starting to delete query "ROUTE" "ke 8. huhti 09:53:36 2009"
if (query)
delete query;
//Finished deleting query "ROUTE" "ke 8. huhti 09:53:46 2009"
//Starting to delete query "ROUTE" "ke 8. huhti 09:53:36 2009"
if (query)
delete query;
//Finished deleting query "ROUTE" "ke 8. huhti 09:53:46 2009"
To copy to clipboard, switch view to plain text mode
Any idea why deletion of QXmlQuery takes such a long time.
Bookmarks