Multithreaded parsing is slower then sequential
<p>I am parsing 4 large XML files through threads and somehow the multithreaded code is slower then the sequential code?</p>

<p>Here is my multithreaded code:</p>

<pre><code>  def parse():
    thread_list = []

    for file_name in cve_file:
        t = CVEParser(file_name)
        t.start()
        thread_list.append(t)

    for t in thread_list:
        t.join()
        result = t.result
        for res in result:
            print res
            PersistenceService.insert_data_from_file(res[0], res[1])
            os.remove(res[0])
</code></pre>

<p>and thats the "faster" code:</p>

<pre><code>def parse:
thread_list = []

for file_name in cve_file:
    t = CVEParser(file_name)
    t.start()
    t.join()
    thread_list.append(t)

for t in thread_list:
    result = t.result
    for res in result:
        print res
        PersistenceService.insert_data_from_file(res[0], res[1])
        os.remove(res[0])
</code></pre>

<p>The sequential code is faster by 10 whole minutes, how is this possible?</p>