Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Sharable Addons Proposal #1126

Open
aljimenez opened this issue May 17, 2013 · 2 comments
Open

Sharable Addons Proposal #1126

aljimenez opened this issue May 17, 2013 · 2 comments

Comments

@aljimenez
Copy link
Contributor

Addon instantiation time can add up in large applications. Perhaps we can share certain addons per request and even across requests. Addons would have a property that it can use to indicate whether it can be shared per requests or for all requests. By doing this certain addons such as the cookies addon can indicate that it can be shared per request and would only be instantiated once per request. Global addons that do not depend on requests would only be instantiated once per application.

This would not only cut down on addon instantiation time but would also limit the amount of memory used and garbage collection.

@drewfish
Copy link
Contributor

This is an interesting idea. At the very least I think it's worth doing some experiments to see how much of a benefit it might have.

@caridy
Copy link
Contributor

caridy commented May 22, 2013

The global structures that you're reference here ARE NOT action context, they need to be something else. ActionContext addons are tied to an action executed on a mojit instance by definition, which means they will never be global. But I could not agree more that today people are using addons to mitigate a bigger problem, the lack of page-level structures that can be used by any mojit instance in the context of that page (independently or the runtime). We do have some ideas, and we will formalize them in the next few days, I will keep you posted.

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

No branches or pull requests

3 participants