Bug 463965 - Performance EcorePlatformUtil / WorkspaceSynchonizer getFile
Summary: Performance EcorePlatformUtil / WorkspaceSynchonizer getFile
Status: CLOSED WONTFIX
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.9.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Stephan Eberle CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-06 08:26 EDT by Andreas Graf CLA
Modified: 2024-05-07 00:28 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Graf CLA 2015-04-06 08:26:07 EDT
Sphinx makes heavy use of EcorePlatformUtil. In our scenarios, we see this as a performance impact. 

org.eclipse.sphinx.emf.resource.ContextAwareProxyURIHelper.augmentToContextAwareProxy(EObject, Resource)

seems to call EcorePlatformUtil.getFile(....) for all proxy.

In effect, that will invoke code like org.eclipse.core.internal.localstore.FileSystemResourceManager.resourceForLocation(IPath, boolean) FileSystemResourceManager.java 32276

for each proxy. However, this seems quite inefficient, since the file for a given Resource is unlikely to change. Would it be possible to cache this.
The problem are cases, where the file could actually be changed between to invocations:

* E.g. by resetting the URI (--> could be mitigated by actually caching resource & URI)

* the file is actually really gone (e.g. by manipulating projects / IResources between invocations directly) or filtered....
Comment 1 Stephan Eberle CLA 2015-04-07 11:48:47 EDT
Sorry, but I cannot see where ContextAwareProxyURIHelper#augmentToContextAwareProxy() calls EcorePlatformUtil#getFile(). EcorePlatformUtil isn't even imported by ContextAwareProxyURIHelper. Could you state the actual location where the use of EcorePlatformUtil#getFile() causes performance problems? Thanks.
Comment 2 Balazs Grill CLA 2024-05-07 00:28:39 EDT
Closed stale issue before migration