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

Slow update time when many requests are sent. #12

Open
ibdafna opened this issue May 12, 2021 · 1 comment
Open

Slow update time when many requests are sent. #12

ibdafna opened this issue May 12, 2021 · 1 comment

Comments

@ibdafna
Copy link
Owner

ibdafna commented May 12, 2021

Each time a request is sent to Flask, WebDash queues a callback function which gets called whenever the next response is received from the back-end (this is synchronous by nature). Whenever many requests are sent at any given time (can be done by hovering over many data points in a short period of time in the cross_filter_app application), WebDash slows down considerably before processing and displaying the last response. We should investigate why this is happening. I suspect it could be related to the overly simple queue "implementation" (in quotation marks because it's a simple array) we're using:

class ResponseQueue {
constructor() {
this.queue = [];
}
enqueue(onSuccessFn: Function) {
return this.queue.push(onSuccessFn);
}
dequeue() {
return this.queue.shift();
}
queue: Array<Function>;
}

@ibdafna
Copy link
Owner Author

ibdafna commented Jul 29, 2021

@ivanov Any ideas on that one? Do you think it could be the excessive pushing/shifting operations on the queue? Could potentially use a linked list here

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

No branches or pull requests

1 participant