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

Performance issue #212

Open
szschaler opened this issue Sep 20, 2024 · 3 comments
Open

Performance issue #212

szschaler opened this issue Sep 20, 2024 · 3 comments
Assignees
Labels
bug Something isn't working potential student project An issue that could become a student project

Comments

@szschaler
Copy link
Contributor

szschaler commented Sep 20, 2024

I just tried to get somewhere around 40 students to generate an Xtext grammar at the same time and it crashed the server. As far as I can tell, the Xtext container and possibly even the Docker daemon got killed. The Xtext container would attempt to restart automatically, which would create extra load on the server, together with all clients continuing to poll for console updates.

It would be worth doing some performance testing to work out what we can do to improve this. It may be an issue to do with the polling for successful editor generation, which we should probably change to server-side events / websockets to improve efficiency.

@szschaler szschaler added the bug Something isn't working label Sep 20, 2024
@szschaler szschaler self-assigned this Sep 20, 2024
@szschaler szschaler moved this from Todo to Bugs in Education Platform Sep 20, 2024
@szschaler szschaler added the potential student project An issue that could become a student project label Sep 20, 2024
@szschaler
Copy link
Contributor Author

We can also consider queuing requests in the Xtext tool so that it doesn't get overloaded.

@aryaei2000
Copy link
Collaborator

The number of polling requests can be the culprit here. It's helpful if we can look into the monitoring software to see what resource was used the most. I believe the current polling method is server-side events, or at least it looks like SSE from the browser side. Switching to web sockets can reduce some overheads.

@szschaler
Copy link
Contributor Author

Thanks, @aryaei2000 for looking at this. The current polling method is, I think, even worse: it's plain polling :-) The culprit is this recursive call here:

await this.checkEditorReady(statusUrl, editorInstanceUrl, editorPanelId, editorActivityId, logPanel);

Instead, checkEditorReady should be replaced by a server-side events or websocket implementation where it's the server's responsibility rather than the client's to send updates whenever they're ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working potential student project An issue that could become a student project
Projects
Status: Bugs
Development

No branches or pull requests

2 participants