Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the performance of the RAV reader #135

Open
programarivm opened this issue Nov 3, 2023 · 0 comments
Open

Improve the performance of the RAV reader #135

programarivm opened this issue Nov 3, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@programarivm
Copy link
Member

programarivm commented Nov 3, 2023

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.

output_trimmed_enhanced_reduced

At this moment two API queries are being used.

  • GET /annotations/games
  • POST /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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant