Editing ajile: Path Resolution Speed Test This edit will create a new revision. Your details (optional) Name Email (won’t be displayed; might be used for Gravatar) URL Test case details Title * Published (uncheck if you want to fiddle around before making the page public) Description (in case you feel further explanation is needed)(Markdown syntax is allowed) Intended to compare how quickly each ajile version resolves paths from module names but technical difficulties loading ajile before the tests is blocking progress :-( Looks like this is a jsPerf limitation. Needs to support executing dynamically inserted scripts in setup() before executing individual test cases. Are you a spammer? (just answer the question) Preparation code Preparation code HTML (this will be inserted in the <body> of a valid HTML5 document in standards mode) (useful when testing DOM operations or including libraries) <script type="text/javascript"> var versions = [ "src" , "1.2.1" //, "1.1.5" , "0.9.9.2" //, "0.9.9.1", "0.9.9", "0.9.8", "0.9.5", "0.9" , "0.7.9" //, "0.7.8", "0.7.6" , "0.6.5" //, "0.6.2" ]; function ajile () { var script = document.createElement ("script"); script.type = "text/javascript"; script.async = false; ajile.script = script; var version = versions.pop(); version = version ? ("."+version+".") : "."; var lib = ajile.map [version]; script.src = ajile [lib || "net"] + ajile.name + version + ajile.config ; document.lastChild.firstChild.appendChild (script); } ajile.map = { ".src." : "github" , ".1.2.1.": "github" }; ajile.github = "https://raw.github.com/iskitz/ajile/master/lib/ajile/"; ajile.net = "//ajile.net/use/"; ajile.name = "com.iskitz.ajile"; ajile.config = "js?debugoff,mvcoff,mvcshareoff"; ajile.resolvePath = function testPathResolutionSpeed() { var thread = setInterval (function isAjileLoaded() { if (!(this.Ajile && this.Import)) return; Import ("a.deeply.nested.non-existent.module"); deferred.resolve(); clearInterval (thread); },10); }; ajile.cleanup = function cleanup() { Ajile.Unload ("a.deeply.nested.non-existent.module"); Ajile.Unload (); document.lastChild.firstChild.removeChild (ajile.script); delete ajile.script; }; </script> Include JavaScript libraries as follows: <script src="//cdn.ext/library.js"></script> Define setup for all tests (variables, functions, arrays or other objects that will be used in the tests) (runs before each clocked test loop, outside of the timed code region) (e.g. define local test variables, reset global variables, clear canvas, etc.) (see FAQ) ajile(); Define teardown for all tests (runs after each clocked test loop, outside of the timed code region) (see FAQ) ajile.cleanup(); Code snippets to compare Test 1 Title Async (check if this is an asynchronous test) Code ajile.resolvePath(); Test 2 Title Async (check if this is an asynchronous test) Code ajile.resolvePath(); Test 3 Title Async (check if this is an asynchronous test) Code ajile.resolvePath(); Test 4 Title Async (check if this is an asynchronous test) Code ajile.resolvePath(); Test 5 Title Async (check if this is an asynchronous test) Code ajile.resolvePath();