Bug 463965

Summary: Performance EcorePlatformUtil / WorkspaceSynchonizer getFile
Product: [Automotive] Sphinx Reporter: Andreas Graf <graf>
Component: CoreAssignee: Stephan Eberle <stephaneberle9>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: balazs.grill
Version: 0.9.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

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