Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316115 - Cache resources returned by IResourceLocator
Summary: Cache resources returned by IResourceLocator
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.5.2   Edit
Hardware: All All
: P3 normal with 5 votes (vote)
Target Milestone: 3.7.0   Edit
Assignee: Yu Chen CLA
QA Contact: Xiaoying Gu CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-08 07:58 EDT by Marcel Stör CLA
Modified: 2011-05-16 05:25 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Stör CLA 2010-06-08 07:58:58 EDT
I noticed that my implementation of org.eclipse.birt.report.model.api.IResourceLocator#findResource() is called dozens of times for one and the same resource (images,
resource bundle properties, javascript/JARs referenced in the .rptdesign
files).

I expect that BIRT uses a cache for such resources.
Comment 1 Marcel Stör CLA 2010-06-08 08:02:13 EDT
Discussion was started here: http://www.eclipse.org/forums/index.php?t=msg&th=169329&start=0&
Comment 2 Jun Ouyang CLA 2010-08-06 03:45:10 EDT
It's better for user to do cache in the implementation of IResourceLocator.
Comment 3 Marcel Stör CLA 2010-08-06 03:58:53 EDT
Sorry, I must insist. Look at the signature of IResourceLocator and you'll notice that clients have to chance to cache resources:

http://www.birt-exchange.com/be/documentation/BIRT_220/EngineJavadoc/model/api/org/eclipse/birt/report/model/api/IResourceLocator.html#findResource%28org.eclipse.birt.report.model.api.ModuleHandle,%20java.lang.String,%20int%29

IResourceLocator returns a URL i.e. it's just a pointer to a resource. We already cache URL resolutions based on names but that's as much as we can do.
Comment 4 Wenfeng Li CLA 2011-01-19 17:20:23 EST
schedule to Indigo release to investigate.
Comment 5 Yu Chen CLA 2011-05-16 05:25:19 EDT
Fixed.