Skip to content

Move populateSketchbookMenu to a separate thread #1037

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Stefterv
Copy link
Collaborator

@Stefterv Stefterv commented Apr 15, 2025

We were getting reports of Processing being slow to start, we diagnosed it to having a lot of folders within the sketchbook. The problem arises from Processing indexing all the folders recursively on the UI thread.

While this has been a known issue—documented in the troubleshooting guide—we noticed it's made significantly worse in cases where users have multiple Android SDKs installed inside their sketchbook; each SDK contains a large number of subfolders, making Processing hang for a long time on startup or when switching mode.

This PR moves the scanning to a separate thread. It also skips scanning the android folder if present in the sketchbook.

These changes should help alleviate some of the slowdown but it’s only a quick fix. Long term, we probably need a better approach, avoiding recursion and maybe caching the results.

Fixes #1036
Related to #897?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

Processing gets slow if you have multiple android sdks installed
1 participant