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

Refactor updateUnknownsAndDuplicates to only check certain wells, making it more efficient #591

Open
fedarko opened this issue Sep 11, 2019 · 0 comments

Comments

@fedarko
Copy link
Collaborator

fedarko commented Sep 11, 2019

Recapping this issue: I wrote the following comment in patchWell()

success: function(data) {
that.data[row][that.grid.getColumns()[col].field] = data["sample_id"];
// NOTE: this pretty much checks the status of every well, and this is
// called in patchWell (i.e. every time a well is updated). Should be a
// lot more efficient to minimize the impact of this by just checking for
// changes relative to this well?
that.updateUnknownsAndDuplicates();
var classIdx = that.wellClasses[row][col].indexOf("well-prev-plated");
if (data["previous_plates"].length > 0) {
that.wellPreviousPlates[row][col] = data["previous_plates"];
addIfNotPresent(that.wellClasses[row][col], "well-prev-plated");
} else {
safeArrayDelete(that.wellClasses[row][col], "well-prev-plated");
that.wellPreviousPlates[row][col] = null;
}

@AmandaBirmingham responded to it here

Probably. updateUnknownsAndDuplicates is completely agnostic to whatever change triggered it--but that means it has to be brute-force and re-check everything. I think it is the source of a lot of the performance issues in the platemapper, and probably needs to be rethought from the ground up. Could you add an issue to the repo for this, and then remove this comment?

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

No branches or pull requests

1 participant