Hello everybody,
I managed to add an offline game database to PicoChess Web. Since it runs on a Raspberry Pi, it doesn't have the same functionality as ChessUI's database. Here are the changes/restrictions:
* Only the first 5 games containing the current position are displayed.
* There is no reordering of results, games are displayed in database order.
* No additional search function.
* The maximum number of games in the database depends on the RAM and processor speed.
* The database uses the scid format and is unrelated to the opening book. This means that you can, but do not have to, use the same database as the basis for the openings book and the games database.
And this is how it looks:
Performance
I tested on a Raspberry Pi 3b with 1GB RAM.
Note: ChessUI's 2 million games database, converted to scid format, was not working on my Raspberry Pi. I suspect the names didn't fit in RAM. However, the database worked fine when I ran the server on a different Linux host.
I've reduced the number of games to around 400,000 (all games with both players having 2400+ ELO). Then I ordered the database by ELO to show the games with the highest combined ELO first. Loading the game list for the initial chess position takes about 1.5 to 2 seconds. All subsequent searches are faster, with queries typically taking less than a second.
To complete this, here is a screenshot of the book page:
Gerhard