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

Speed up copy_find_path by specifying maxdepth in find #526

Merged
merged 2 commits into from
Jul 26, 2021

Conversation

nisargjhaveri
Copy link

In some cases, getting path for Symbols or DeveloperDiskImage.dmg took too long (~5-10 seconds) due to inefficient use of find command.

This PR attempts to fix that by limiting find in copy_find_path to specific max depth. The max depth is calculated crudely by simply counting number of forward slashes in the pattern. This brings down the time in my particular case from ~6 seconds to ~0 seconds.

src/ios-deploy/ios-deploy.m Outdated Show resolved Hide resolved
src/ios-deploy/ios-deploy.m Outdated Show resolved Hide resolved
Copy link

@gabebear gabebear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@gabebear gabebear merged commit 0ea6400 into ios-control:master Jul 26, 2021
@nisargjhaveri nisargjhaveri deleted the copy_find_path_speed branch March 9, 2023 19:36
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