Looking way ahead to December Diversions, the CF track is looking a bit thin with only 28 exercises total. If I counted correctly, there are 76 other exercises with all these attributes:
Is it worthwhile for me to start PR’ing a few? I could begin with some I just like (personal prejudice!), then focus on the December shortlist once Erik turns his attention to this.
Both queen-attack and run-length-encoding are now merged, so I tried testing the exercises in the online editor to make sure they work (these are the first new CF exercises since 2017, so it’s not a well-trodden path). The results were not particularly encouraging!
For queen-attack, the first 3 attempts timed out, then it passed on the 4th.
For run-length-encoding, 4 attempts timed out, the 5th gave an unspecified error, the 6th timed out and the 7th passed. On run 5, the error message was pretty unhelpful:
“An error occurred while running your tests. This might mean that there was an issue in our infrastructure, or it might mean that you have something in your code that’s causing our systems to break.”
Clearly, the submitted solutions were capable of passing. Is the CF test runner particularly slow and/or unstable? Is @iHiD still burying the servers under squillions of jobs? I submitted some older exercises a few days ago, and they also had repeated timeout problems.
It is slow, but I can’t seem to improve it. Things I’ve tried:
Changing the base docker image.
We’re currently using ortussolutions/commandbox:amd64-jdk8-3.3.0. I’ve tried more recent JDKs (things became slower), and I also tried Alpine, which made things incredibly slow.
Updating the testBox library to the latest version (we use 2.5.0+107 at the moment). No difference.
That’s sort of where my ColdFusion knowledge ends. We’re running the tests via box task run TestRunner, so maybe there is a flag or something that can help speedup execution?
@colinleach Do you have any suggestions on how to improve performance?
Playing with this locally, it seems like loading Java and CF with box takes a few seconds, then testing with task run TestRunner completes in milliseconds. An underlying problem is that running single, small jobs from the Linux shell is extremely rare outside Exercism: CF is used mainly as a web server which runs continuously, and CommandBox (box) provides an OS-independent interactive shell to control things. Startup time isn’t much of a concern for most other users.
There don’t seem to be any command-line switches for box. I think it does the slow Java+CF startup before interpreting anything else on the command line or reading configuration files.
Apologies for the pessimism! Also for my almost total ignorance of Docker (maybe I should fix that?).
It’s unfortunate. I still think CF has merit in other contexts (now there’s an open-source alternative to the eye-wateringly expensive Adobe version), but it may be a poor fit for Exercism.
I’ll still aim to PR all-your-base and dnd-character, but I’ve become less motivated to do much more than that.
One thing that might be easy and worthwhile is syncing the documentation with problem-specifications, to keep configlet happy. Worth a PR?