Improve the performance of the RAV reader
The getFen() method in Chess\Play\RavPlay can be quite slow if a movetext contains a significant amount of chess moves across multiple variations.
See:
Thus, the POST /play/rav API endpoint is slow because it is currently using the getFen() method to calculate the FEN positions. The example below takes a few seconds to calculate about 200 FEN positions.
At this moment two API queries are being used.
GET /annotations/gamesPOST /play/rav
The performance of the RAV reader can be improved by removing the POST /play/rav call from the user interface on the one hand. Then, the information for the RAV reader including the FEN positions can be precalculated and added to data/annotations/games.json.
This way one API query would be used:
GET /annotations/games
Happy learning and coding!