Skip to content

Performance: background loader#1227

Merged
kaamui merged 2 commits intoOpenBoard-org:devfrom
letsfindaway:perf-background-loader
Feb 14, 2025
Merged

Performance: background loader#1227
kaamui merged 2 commits intoOpenBoard-org:devfrom
letsfindaway:perf-background-loader

Conversation

@letsfindaway
Copy link
Copy Markdown
Collaborator

This PR adds a background loader to read thumbnail files in another thread so that disk I/O, especially with a slow network drive, does not interfere with user actions.

The new class UBBackgroundLoader takes a list of file names and produces a list of results containing the data in these files in the same sequence. The I/O operations are performed on another thread.

The UBThumbnailScene is adapted to use the background loader for reading thumbnail file data. This avoids blocking operations on the main thread and improves user experiences during thumbnail loading.

- load a list of files on a separate thread
- provide files contents as QByteArray
- guarantee sequence of files
- provide a list of thumbnail file names
- use UBBackgroundLoader to load them on a separate thread
- create thumbnails from results on the main thread
@kaamui kaamui merged commit 82b1110 into OpenBoard-org:dev Feb 14, 2025
@letsfindaway letsfindaway deleted the perf-background-loader branch February 14, 2025 14:10
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

Successfully merging this pull request may close these issues.

2 participants