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

Reduce requests for widgets and operators #213

Closed
DerJayDee opened this issue Jul 6, 2016 · 1 comment
Closed

Reduce requests for widgets and operators #213

DerJayDee opened this issue Jul 6, 2016 · 1 comment
Assignees
Milestone

Comments

@DerJayDee
Copy link

DerJayDee commented Jul 6, 2016

For every widget the WirecloudAPIBootstrap.js file is requested. For every operator the WirecloudOperatorAPI.js file is requested. Both files are not compressed although DEBUG = False is set in the settings.py.
It would be great if those files would also get compressed by the django-compressor.

It would be even greater when those files would get requested only once for the whole dashboard.

And to top it all off: It would be perfect if there is a possibility of sharing JS-Scripte in between widgets / operators. For example jQuery is probably used in most widgets.

So I have a dream that one day a wirecloud admin is able to specify a folder on the wirecloud host system that contains JavaScript files that get compressed and are shared among all widgets and operators.

@aarranz aarranz added this to the Jul 2016 milestone Jul 6, 2016
@aarranz aarranz self-assigned this Jul 6, 2016
@aarranz
Copy link
Member

aarranz commented Jul 6, 2016

Thanks for reporting this; we are going to work on it as soon as possible.

We are going to work on creating a compressed file from WirecloudAPIBootstrap.js, WirecloudWidgetAPI.js and WirecloudAPICommon.js for widgets and a compressed file from WirecloudAPIBootstrap.js, WirecloudOperatorAPI.js and WirecloudAPICommon.js for operators.

It would be even greater when those files would get requested only once for the whole dashboard.

Well, those files are currently requested only one time as much, at least if you follow the installation instructions, as they are configured to be cached for a year. I'm guessing you means to execute this file only one time... but I'm afraid that this cannot be accomplished using current browsers (i.e. without support for shadow DOM or anything similar) and with the current WireCloud architecture. Anyway, those files are currently taking ~20ms to load (per widget/operator) once cached, we'll see how much we are able to reduce this time :).

And to top it all off: It would be perfect if there is a possibility of sharing JS-Scripte in between widgets / operators. For example jQuery is probably used in most widgets.

This also seems a great idea 👍, but probably this is better tracked by creating a new ticket.

@aarranz aarranz closed this as completed in 97dd7be Jul 9, 2016
aarranz added a commit that referenced this issue Jul 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants