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 item details UI performance #1021

Merged

Conversation

mvasilak
Copy link
Contributor

Improves UI performance for item details. When there is a large number of sizable notes, e.g. ones created from annotations, scrolling becomes sluggish, and opening attachments from the details view causes the app to hang as the loading of the file is very slow.

@mvasilak mvasilak requested a review from michalrentka October 31, 2024 14:39
@michalrentka
Copy link
Contributor

Just to confirm, the "performance improvement" was moving the slow parts to background? :) I didn't know we could do data source snapshot updates in background, doesn't it break anything? Otherwise if this helps then great.

@mvasilak
Copy link
Contributor Author

mvasilak commented Nov 1, 2024

In this case, both this and the snapshot memory reduction are performance improvements, but the latter has a larger effect.

Using a background queue for diffable data source updates has been suggested since its introduction. The framework handles the snapshot application in the main queue, and all business logic can be safely done in the background.

@michalrentka
Copy link
Contributor

Using a background queue for diffable data source updates has been suggested since its introduction. The framework handles the snapshot application in the main queue, and all business logic can be safely done in the background.

Good to know, we could definitely move all diffable data source interactions to background then. Feel free to create a ticket for it.

@mvasilak mvasilak requested a review from michalrentka November 2, 2024 09:34
@michalrentka
Copy link
Contributor

(Sorry, I added comments some time ago and forgot to submit them)

@mvasilak mvasilak merged commit 8ecd528 into zotero:master Nov 6, 2024
1 check passed
@mvasilak mvasilak deleted the improve-item-details-ui-performance branch November 6, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants