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

re-checking multiple boxes only checks the last one #452

Open
stuartpullinger opened this issue Oct 3, 2019 · 1 comment
Open

re-checking multiple boxes only checks the last one #452

stuartpullinger opened this issue Oct 3, 2019 · 1 comment
Assignees

Comments

@stuartpullinger
Copy link
Contributor

Steps to reproduce:

In topcat, I navigated to a dataset with a lot of files (this one has 1401). I selected all of them and, after a bit of a wait, I had 1401 files in the cart. If I changed my selection - for example, unchecking 2 boxes - it took a while to process and then the 2 boxes were unchecked. If I re-checked the boxes (quickly), it took a while again, then only re-checked one of the boxes - the other reverted back to being unchecked. I could then recheck the unchecked box again and, after a while, it was checked (and added back to the cart) or if I uncheck/recheck a different box, the 'pending' check is corrected.

I suspect this may only manifest when there are a lot of files selected and the time between 'checks' is shorter than it takes Topcat to update the cart.

@brianritchie1312
Copy link
Contributor

Topcat does a lot of processing when items are added to the cart. If I recall correctly, for each new item, it needs to check whether the item's parent entity is already in the cart (in which case it needn't be added), and whether or not the new item is a parent of any current cart members (in which case they can be removed). I doubt that the code is clever enough to detect that the large number of items being added in this case all have the same parent, so it probably takes a while. I wouldn't be surprised to discover that removing a single item from a large cart could also be slow (though this seems less likely). Since all these operations are asynchronous, it's also not surprising that some UI events get lost, though determining exactly how this can happen could be difficult.
A proper fix would probably require a serious overhaul of the selection and cart construction code; and that's unlikely to happen.

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

2 participants