Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion to not require esri/arcgis/utils unless it is needed #138

Open
tomwayson opened this issue Mar 1, 2015 · 2 comments
Open

Suggestion to not require esri/arcgis/utils unless it is needed #138

tomwayson opened this issue Mar 1, 2015 · 2 comments

Comments

@tomwayson
Copy link
Member

It would be nice if esri/arcgis/utils was not required unless it was needed (i.e. unless application calls createWebMap()). I've found for a simple application that uses createMap() and then adds a single feature layer, I can shave off ~30kb of JavaScript by commenting out the code that requires esri/arcgis/utils.

This could be done w/o changing the API by using a nested require block inside createWebMap(). I'm not aware of any drawbacks to that.

Just wanted to get other people's thoughts on this idea.

@tsamaya
Copy link

tsamaya commented Mar 19, 2015

I play with Deferred and Promise to do that
tsamaya@4490cae

I think the drawback is that loading the esriUtils seems to be visible => loading the webmap seems to be longer.

I don't think it is useful for the demo and the any purpose component, but I is good to know the weight for possible optimisation .

@tomwayson
Copy link
Member Author

Too bad that it takes longer, b/c this is the kind of thing I had in mind.

@alaframboise and I talked about this issue before DevSummit and agreed to revisit it when re-working this repo to work w/ JSAPI 4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants