Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325835 - [Startup] Try to initialize injectors lazily
Summary: [Startup] Try to initialize injectors lazily
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P5 enhancement (vote)
Target Milestone: M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-21 07:53 EDT by Sebastian Zarnekow CLA
Modified: 2017-09-19 17:49 EDT (History)
1 user (show)

See Also:
sven.efftinge: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Zarnekow CLA 2010-09-21 07:53:40 EDT
The Ui Plugins will currently create the injectors for each contained language eager on bundle#start. As this is quite costly, we should consider to use a computing map:

new MapMaker().makeComputingMap(new Function<String, Injector>() {
  public Injector apply(String language) {
    return createInjectorFor(language);
  }
})

Therefore we may have to use ResourceServiceProviderDescriptors similar to EPackageDescriptor in the respective extension point implementation.
However it is worth the measure the actual performance gain prior to introducing this additional complexity. 
Furthermore we have to be careful with the semantic of eager singletons, e.g. the validators are not registered by means of an extension point but as a side effect upon injector creation.
Comment 1 Sebastian Zarnekow CLA 2011-12-02 09:59:57 EST
Pushed to master.
Comment 2 Karsten Thoms CLA 2017-09-19 17:38:17 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:49:29 EDT
Closing all bugs that were set to RESOLVED before Neon.0