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

Improve directory scanning performance #4426

Merged
merged 5 commits into from
Jun 26, 2017

Conversation

theotherjimmy
Copy link
Contributor

@theotherjimmy theotherjimmy commented Jun 1, 2017

Description

Graph of the first commit compared to master in the next comment.

The remaining commits allow us to correctly elide much processing. In particular, if we delay scanning of features until we try access their respective resource objects, we can avoid scanning some resources by never trying to access their resource objects. Turns out that this optimization saves us ~1/2 of the scan resources time!

Todos

  • /morph test

@theotherjimmy
Copy link
Contributor Author

theotherjimmy commented Jun 1, 2017

Incremental compile with no changes (seconds):
output

@sg- sg- added the needs: CI label Jun 3, 2017
@0xc0170
Copy link
Contributor

0xc0170 commented Jun 5, 2017

retest uvisor

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 5, 2017

@mazimkhan Please help with uvisor retest here?

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 5, 2017

retest uvisor

@mazimkhan
Copy link

@0xc0170 There is build failure hence re-running CI will not make it work. Please always have a glance at the logs before re-running CI.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 16, 2017

@0xc0170 There is build failure hence re-running CI will not make it work. Please always have a glance at the logs before re-running CI.

I did and I considered the failure to be non related to this patch. Looks like I was wrong, this is the second time, it is related.
@theotherjimmy please look at it. The scanning might be broken as some variables are undefined.

@theotherjimmy
Copy link
Contributor Author

theotherjimmy commented Jun 16, 2017

@mazimkhan Could you link me to the test case that's failing? (I can see the CI failure, I just want a link to the code itself) Nevermind. I'm having trouble reproducing the failure though.

@theotherjimmy theotherjimmy force-pushed the faster-scan branch 4 times, most recently from ee53fa0 to 8d4779a Compare June 16, 2017 17:12
@theotherjimmy
Copy link
Contributor Author

I think this was not ignoring case correctly. Unfortunately, we were depending on "fnmatch.fnmatch" but the code was effectively doing "fnmatch.fnmatchcase". I changed it to do the correct thing.

@theotherjimmy
Copy link
Contributor Author

Huh, different error.

@theotherjimmy theotherjimmy force-pushed the faster-scan branch 2 times, most recently from 7a07cdf to f164eb5 Compare June 16, 2017 19:50
@theotherjimmy
Copy link
Contributor Author

I think I got most of the fat out of the directory scanning. We're down to between 15ms and 45ms spent in resource scanning

@theotherjimmy
Copy link
Contributor Author

theotherjimmy commented Jun 16, 2017

@mazimkhan Looks like it's passing now, but not reporting. Nope it reported. My bad.

@theotherjimmy
Copy link
Contributor Author

/morph test

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 617

Test failed!

@theotherjimmy
Copy link
Contributor Author

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 628

All builds and test passed!

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

Successfully merging this pull request may close these issues.

5 participants