prova a mettere un controllo dopo ogni "pezzo" per vedere dove "tarda", tipo:

Codice PHP:
<?php
$ts 
time();

// example of how to use basic selector to retrieve HTML contents 
include('simple_html_dom.php'); 

$ts time()-$ts; print ($ts); exit; // "#1" <----- questa riga poi la sposti sotto

$html = new simple_html_dom(); 

// "#2" ...mettila qui dopo

// get DOM from URL or file 
$html file_get_html('.....'); 

// "#3" ...poi qui

// find all span tags with class=gb1 
foreach($html->find('span.price') as $e
    
$UE40ES7000 $e->outertext
@
$car "€"
@
$UE40ES7000 str_replace($car,,$UE40ES7000); 


// "#4" ...poi qui

?>
e esegui quattro volte il codice, poi posta qui i quattro valori.. così vediamo qual è il pezzo che fa "tardare"