Chessbase Replay (Large Database)

Takes a long time to load but is ok after that.
Slowness is not the fault of WordPress. Also happens in a plain html.
The script is in the header of this page.
Script in functions.php is not faster.
The database is a pgn file in the WP Media directory.