Opened 10 years ago

Closed 10 years ago

#8422 closed enhancement (fixed)

add layer processing step to reduce calls to getObject via dojo.provide()

Reported by: alex Owned by: alex
Priority: high Milestone: 1.3
Component: BuildSystem Version: 1.2.3
Keywords: build, optimization, speed, getObject, provide Cc: James Burke
Blocked By: Blocking:


We lose a lot of time in package loading thanks to the continued getObject(..., true) calls that are the result o dojo.provide(...). We can do better by inlining the stub object creation and manually adding the modules provided in a layer to _loadedModules.

Change History (4)

comment:1 Changed 10 years ago by alex

Resolution: fixed
Status: newclosed

looks like trac is a bit behind. Fixed in [16334].

comment:2 Changed 10 years ago by liucougar

Resolution: fixed
Status: closedreopened

this caused regression: we are using custom namespace, which is teampatent, and the built version just does not load somehow

after reverting this change, everything works

comment:3 Changed 10 years ago by liucougar

I think the problem is this line:

foo = foo||{}; 

in our case, teampatent is not defined anywhere, so the reference on the right part to foo will make browser complain "undefined variable"

comment:4 Changed 10 years ago by James Burke

Resolution: fixed
Status: reopenedclosed

(In [16346]) Fixes #8422: allows for custom namespaces by using a typeof check for the first shortName. Also I am concerned about the amount of file size bloat this can introduce, so I wrapped it in a kwArgs.expandProvide check: so to get this feature, pass expandProvide=true to the build command. By default this expansion is not done. Added help text for build process to explain the build option.

Note: See TracTickets for help on using tickets.