Skip to content

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?

@SableRaf SableRaf merged commit 9903051 into processing:main Apr 25, 2025
11 of 12 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Processing Roadmap Apr 25, 2025
@Stefterv Stefterv deleted the fix-sketchbook-scanning branch May 15, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

Processing gets slow if you have multiple android sdks installed

2 participants