Bug 157266 - [Content Type] ContentDescriptionManager: want you to implement cache mechanism for performance
Summary: [Content Type] ContentDescriptionManager: want you to implement cache mechani...
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted, performance
Depends on:
Blocks: 156496
  Show dependency tree
 
Reported: 2006-09-14 02:25 EDT by hoshiura CLA
Modified: 2019-09-06 16:16 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 hoshiura CLA 2006-09-14 02:25:17 EDT
ContentDescriptionManager.getDescriptionFor(File, ResourceInfo) is called by our validators/builders. Because I use project specific content type settings, readDescription(File) method is called everytime in getDescriptionFor() method. This means I/O access happens everytime. 

Our method call takes about 5 seconds totally, and getDescriptionFor() method consumes 38 percent in it.

On the other hand, I think you have already had cache mechanism in getDescriptionFor() method for global/workspace-wide content type settings.

Could you please implement similar cache mechanism for project specific setting? 

Since the method is called many time, if you implement the cache mechanism, it should improve the performance.
Comment 1 David Williams CLA 2006-09-14 03:22:06 EDT
What is being attempted to be queried about the description/content type? 
Is it (only) charset? (If so, I think there's already caching for that, at least through the normal, public methods ... at least up to about 500 or 1000 files, or similar). 

If, on the other hand, its some other arbitrary 'property' of IContentDescription, 
then ... perhaps that's the key info needed to fix this. 

BTW, this doesn't happen to be for CSS in JSP's, does it? 
(where the current approach is to look for specific filename? 
If that's the case .. then, that reminds me I never did open a feature 
request for being able to arbitrarily, programatically set 
the a contentType of a specifc resource :) 




Comment 2 hoshiura CLA 2006-09-21 08:19:39 EDT
I thought whether or not that content type/description itself could be cached.
That's for CSS in JSP's. Since project specific content type is enabled in our case, ProjectContentTypes.usesContentTypePreferences(filename) method always returns true.
And then, readDescription() method seems to be called for any type of files.
I saw a comment, "caching for project containing project specific settings is not supported". If possible, if the caching is implemented, I thought the performance is improved.
Comment 3 Naomi Miyamoto CLA 2006-10-06 01:39:57 EDT
I compared 2 projects. (They have different files.)
Project A (project specific content type settings is used) = no cache
Project B (no project specific content type setting)= with cache

1st build
[Project A]
getDescriptionFor() method is called 2,984 times and it takes 7,637 msec. 
[Project B]
getDescriptionFor() method is called 5,339 times, but it takes 2,058 msec, because readDescription() is called only 851 times.
It seems cache is effective for multiple builders.

2nd build
[Project A]
getDescriptionFor() takes 5,657 msec.
[Project B]
getDescriptionFor() takes 107 msec


Comment 4 hoshiura CLA 2006-10-06 01:41:30 EDT
changed to critical.
Comment 5 hoshiura CLA 2006-10-06 07:00:47 EDT
Hot-bug request information

1. Affiliation: IBM
2. Release you want this bug to be fixed in: 1.5.2
3. Justify why this is a hot bug and why it needs to be fixed in that release: Performance.
Comment 6 John Arthorne CLA 2006-10-06 09:49:10 EDT
I understand that this is important to you, but "critical" in this bug system means "crashes, loss of data, severe memory leak".  I am increasing priority, but classifying as an enhancement.
Comment 7 John Arthorne CLA 2006-10-06 09:59:10 EDT
Also, 1.5.2 is a Web Tools release, and "hotbug request" is a Web Tools Project convention.  The next platform release is 3.2.2 at the end of February 2007.
Comment 8 Gary Karasiuk CLA 2006-12-18 13:47:39 EST
Could the target for this be set please.
Comment 9 John Arthorne CLA 2006-12-18 17:30:27 EST
There is no planned target for this request... "LATER" is the most accurate assessment at the moment.
Comment 10 Gaurav Mising name CLA 2007-04-04 04:11:56 EDT
(In reply to comment #9)
> There is no planned target for this request... "LATER" is the most accurate
> assessment at the moment.

Any target decided for this bug?
Comment 11 John Arthorne CLA 2007-04-04 14:28:12 EDT
There is no planned target for this request. Patches welcome.
Comment 12 Eclipse Webmaster CLA 2019-09-06 16:16:22 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.