Author Topic: Lazy loading plugins anyone?  (Read 2135 times)

tobias

  • Newbie
  • *
  • Posts: 7
Lazy loading plugins anyone?
« on: March 31, 2011, 12:31:01 pm »
Has anyone considered lazy loading of plugins?

For instance, if you have a button somewhere that triggers display of a GUI-based plug-in, it would make sense to load that plug-in at that moment. Is there any support in MegaZine3 for this?

Ideally, the plug-in, its localization, asul definition, graphics etc. would load only in response to a user action.

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1989
  • MegaZine3 Developer
    • MegaZine3
Re: Lazy loading plugins anyone?
« Reply #1 on: March 31, 2011, 12:51:21 pm »
The point would be to reduce initial load times, yes?

Principally I like the idea, although I'm skeptical about the loading triggered via a user interaction - because that would bring the waiting back. It'd probably be nicer to load it at the beginning, too, but not wait for that plugin to complete to move on with the rest of the loading process. Thing is, the plugin would've have to declare whether it's "lazy-loadable" or not itself (e.g. batchpages would probably never want to be loaded lazily). Which triggers the issue that the containing SWF would have to be loaded anyway, which is the bulk of the waiting time, normally...

As an alternative you could try using the - or a customized - fat client. That gets rid of some redundant code in the plugins, thus saving quite a bit in size.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.