Skip to content

RequireJS Profiler - trace dependency tree, loading patterns and module level load timing

Notifications You must be signed in to change notification settings

micmro/RequireJS-Profiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

RequireJS Profiler

Tool to profile the loading of AMD modules loaded via RequireJS.

alt text

Using the profiler

Adding the profiler
<script src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.11/require.min.js"></script>
<script src="rjsprofiler.js"></script>
<script>
	//load first module
	require(["common"]);
</script>

currently there is a dependency on jQuery, but it should be easy to replace.

Getting results from the profiler (from the console)
//show a table of the loading times of modules
rjsProfiler.showResult()

//show dependency tree with loading times and initially loaded modules in iFrame
rjsProfiler.printDependencyTree(true)

//show dependency tree just in console
rjsProfiler.printDependencyTree()

About

RequireJS Profiler - trace dependency tree, loading patterns and module level load timing

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published