Confluence exports are read unbuffered. This is very inefficient  show  and slow  things down a lot, as can be seen in  the  flame graph in result-unbuffered.html.
  The same import with buffered reads is around 3 times faster on a 5.5 GB entities.xml file, down from around 1h to around 20 min. flame graph at result-buffered.html  |  
                                
                              
                                 |