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

Refresh thumbnail after file change #2340

Closed
wants to merge 24 commits into from
Closed

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Oct 10, 2023

Fixes #2327
Fixes #2455 (not intentional)

  • Handle CHANGES_DONE_HINT events by updating icon
  • Ignore duplicate events and events from transient files
  • Avoid issues causes by caching of thumbnails internally by only caching remote thumbnails
  • Improve performance by avoiding unnecessary icon lookups when scrolling
  • Move some cache and thumbnail related code from AbstractDirectoryView to File
  • Fix an issue (on OS8) where some standard icons were not displayed on startup.

The issue was fundamentally caused by CHANGES_DONE_HINT events from the directory monitor being ignored. However it was found that just fixing that did not reliably fix the problem - icons did not always update at all sizes. This was found to be due to the way Files caches icons internally. Trying to work round this proved intractable. It was found that dropping caching for local files and themeable icons combined with reducing the number of lookups being performed unnecessarily resulted in no discernible performance hit on modern hardware (i5 processor and SSD storage).

Caching was retained for remote files to maintain performance on slow connections. Remote locations cannot be monitored for changes by the directory monitor so the linked issue will always occur for remote files anyway.

@jeremypw jeremypw marked this pull request as ready for review October 11, 2023 17:57
@jeremypw jeremypw marked this pull request as draft October 11, 2023 17:59
@jeremypw
Copy link
Collaborator Author

Investigating regression.

@jeremypw
Copy link
Collaborator Author

@danirabbit Looks like FileAttribute.STANDARD_ICON only returns a standard folder icon for user folders so cannot substitute for that function I am afraid. However, while checking this, I noticed there are some new? attributes related to thumbnail status that might be useful. I guess they might not work for non-native/remote files though unless gvfs generates them locally.

jeremypw added 3 commits July 14, 2024 18:45
# Conflicts fixed in:
#	libcore/Directory.vala
#	src/View/AbstractDirectoryView.vala
@jeremypw jeremypw marked this pull request as ready for review July 15, 2024 17:52
@jeremypw jeremypw requested a review from a team July 15, 2024 17:52
@jeremypw jeremypw mentioned this pull request Aug 18, 2024
@danirabbit
Copy link
Member

@jeremypw is there any way to break this up into smaller chunks? I'm having trouble following all of the changes here. I'm not really familiar with this code but I know you've been waiting for review here for quite some time.

@jeremypw
Copy link
Collaborator Author

@danirabbit I'll try!

libcore/IconInfo.vala Outdated Show resolved Hide resolved
@danirabbit danirabbit added the Conflicts with master Has conflicts that need resolving before merging with master label Sep 10, 2024
@jeremypw
Copy link
Collaborator Author

I think the linked issues have now been resolved by the partial PRs that have been merged so its not worth trying to sort out the conflicts. I am going to close this.

@jeremypw jeremypw closed this Sep 30, 2024
@jeremypw jeremypw deleted the refreshthumbnail-editedimage branch September 30, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Conflicts with master Has conflicts that need resolving before merging with master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No large thumbnails The thumbnail does not update?
3 participants