Skip to content

Conversation

@bdw429s
Copy link
Contributor

@bdw429s bdw429s commented Feb 14, 2020

OK, I have done an experiment to try and shave off about 4 seconds or so of startup time. Results may vary based on CPU power, etc. As much as I love the task runners and print helper, etc they rely on a bunch of modules that load up when CommandBox starts. I've changed the task component to a regular .cfm file that is directly invoked, bypassing the normal CommandBox bootstrap. I've also updated the readme to show how to call it now.

box -clishellpath=/path/to/TestRunner.cfm

All of the rest of the conventions as far as the test files and such should work the same. I just had to add a bit of boilerplate code to it to do what I needed. Please give this a try and see if it improves the execution time. I do think you'll need the absolute path to the testrunner.cfm file.

@bdw429s bdw429s requested a review from kazk February 14, 2020 19:19
Copy link
Member

@kazk kazk left a comment

Choose a reason for hiding this comment

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

Thanks @bdw429s! I don't have numbers yet, but it seems much faster.
The only issue is that the exit code on failure/error doesn't seem to be set anymore.

@kazk kazk merged commit fa70efa into codewars:master Feb 14, 2020
@kazk
Copy link
Member

kazk commented Feb 14, 2020

3-4s speed up on my laptop 🚀
I'll let you know when this is deployed.

@bdw429s
Copy link
Contributor Author

bdw429s commented Feb 14, 2020

Sweet, sounds good.

@kazk
Copy link
Member

kazk commented Feb 17, 2020

Deployed

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