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

Library loading is blocking the main thread #861

Open
BPerlakiH opened this issue Jul 11, 2024 · 1 comment · May be fixed by #974
Open

Library loading is blocking the main thread #861

BPerlakiH opened this issue Jul 11, 2024 · 1 comment · May be fixed by #974
Assignees
Milestone

Comments

@BPerlakiH
Copy link
Collaborator

BPerlakiH commented Jul 11, 2024

When opening the application, the library loading is still doing some heavy work on the main thread.
If we open the application it is needed to load the library straight away, but there are cases when this is not immediately needed. Eg. when the Kiwix app is not open, and we open it by clicking on a ZIM file in Finder. If no other windows were saved earlier, it will open the content page, therefore the library loading can be either postponed, or done in the background.

The more ZIM files we have in our library the longer we will be stuck on this screen:
Screenshot 2024-07-12 at 00 32 33

@BPerlakiH BPerlakiH self-assigned this Jul 11, 2024
@kelson42 kelson42 added this to the 3.4.1 milestone Jul 12, 2024
@BPerlakiH BPerlakiH modified the milestones: 3.4.1, 3.5.0 Jul 12, 2024
@BPerlakiH
Copy link
Collaborator Author

After some investigation, this is not going to be an easy change, as the underlying Objective-C code is not thread safe, so that needs to be replaced with swift code or split into smaller chunks, so we can do the file open / reading part on a different thread. For this reason I changed the milestone for this to be 3.5.0.

@kelson42 kelson42 pinned this issue Sep 6, 2024
@BPerlakiH BPerlakiH linked a pull request Sep 12, 2024 that will close this issue
@BPerlakiH BPerlakiH linked a pull request Sep 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants