[MockBox BE] 1.2 Million class files on disk

So, my build engineer let me know the other day that our unit tests were taking longer and longer to run on our Jenkins server. They would run in about 14 seconds locally, but took 5-6 minutes on that server. A quick look at the stack traces, showed an inordinate amount of time writing the class files to disk for MockBox’s mocks (which have randomly generated names). I looked in the cfclasses directory on that server and found 1.2 Million class files which had been accumulating since November 2011. I deleted them (which was no easy task since Windows HATES large directory listings) which put performance back to normal. I’ve noted that several thousand new class files get created every time we run our unit tests suite so I am concerned about this being a re-ocurring issue.

  1. I always assumed CF cleaned those disk files up after a while. Is that not the case?
  2. Has anyone else run in to this? (If you run unit tests regularly, check your \wwwroot\WEB-INF\cfclasses directory and see)
  3. Is there anything MockBox can do differently to reduce the number of templates that CF wants to cache?
    Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

  1. I always assumed CF cleaned those disk files up after a while. Is that not the case?
    Nope. I hate this feature and almost always NEVER enable it.

  2. Has anyone else run in to this? (If you run unit tests regularly, check your \wwwroot\WEB-INF\cfclasses directory and see)
    I don’t because I don’t save class files

  3. Is there anything MockBox can do differently to reduce the number of templates that CF wants to cache?
    Not really. Each mock method needs to be compiled, so no workaround

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

It is never recommended that this be switched on for any Development machines.

Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: http://plus.google.com/113032480415921517411