Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369690 - [xtext][performance] override getExportedObjectsByType() in DescriptionAddingContainer and FilterUriContainer
Summary: [xtext][performance] override getExportedObjectsByType() in DescriptionAdding...
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.2.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-25 11:05 EST by Knut Wannheden CLA
Modified: 2017-09-19 17:07 EDT (History)
1 user (show)

See Also:


Attachments
proposed patch (2.02 KB, patch)
2012-01-26 07:33 EST, Knut Wannheden CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Knut Wannheden CLA 2012-01-25 11:05:15 EST
The current implementations of getExportedObjectsByType() in the classes DescriptionAddingContainer and FilterUriContainer ends up iterating over all resources and calling the getExportedObjectsByType() method on those. It would be preferable to delegate the call instead.

Furthermore this method should be overridden by FilterUriContainer anyways to implement the filtering.
Comment 1 Knut Wannheden CLA 2012-01-26 07:33:25 EST
Created attachment 210110 [details]
proposed patch

If there is no objection I would like to apply the attached patch.

The performance problem was detected in a content assist use case. Normally this wouldn't make any difference really, as in the end the same thing would happen in ResourceDescriptionsData. But in our case the "index" is backed by a relational database and it is much better with a single query loading all objects compared to one query for every resource.

Also note that the two mentioned classes already override getExportedObjects(EClass, QualifiedName, boolean) for pretty much the same reason: This query is optimized inside ResourceDescriptionsData.
Comment 2 Sebastian Zarnekow CLA 2012-01-26 07:52:49 EST
+1
Comment 4 Karsten Thoms CLA 2017-09-19 16:56:35 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 17:07:40 EDT
Closing all bugs that were set to RESOLVED before Neon.0