See the below.

7/25/2002 12:00:36 PM, peter lin <[EMAIL PROTECTED]> wrote:

>
>
>Vernon Wu wrote:
>> 
>> Peter,
>> 
>> Thanks for your suggestion.
>> 
>> Can you clarify the statement: "the data in the resource files are static"?
>> 
>> In regarding of the five options you mentioned:
>> >1. use the cache tag, which uses fmt tag
>> >2. write a custom tag which caches it as someone else mentioned
>> 
>> The caching mechanism only works when at least portion of data has be retrieved 
>early.
>> In my case, only a small among data, if there is any, has be retrieved before the 
>page from the resource file. So 
these
>> two approaches might not solve the problem
>>
>
>hmm, if I am reading you correctly, from request to request, the cached
>data from the resouce files may be limited. Caching wouldn't really
>help, unless it doesn't expire any loaded data. If that is the case, you
>might be better off loading all the stuff statically when tomcat starts
>up and register file events on the resouce files to get dynamic updates.

Do you mean to load the resource file data during the TC initialization ? If so, it 
still needs a big dunk of memory, doesn't 
it? 
Please explain  "register file events on the resouce files to get dynamic updates"

>
>> >3. write a custom tag that extends the fmt tag
>> 
>> What is the goal of this extension? Is it to refine the fmt tag implemention so 
>that it will not eat up the much memory? 
Or
>> to have the caching mechanism on?
>
>You have several different ways of doing this right.  If the default
>properties/resourcebundle class is too slow, you could write a custom
>bean that takes advantage of nbio to improve the performance. 

Performance is not what I consider at this point.

>
>> 
>> >4. patch fmt tag to cache it and submit the patch to shawn
>> 
>> I would like to do that once I am free from current project.
>> 
>> >5. you can write a custom extension to the resource bundle that does the
>> >caching. that will allow you to use fmt tag as is and have your resource
>> >extension do the caching
>> 
>> For a set of large size resource files, this approache also comsumes a lot of 
>memory and it will hold the memory 
during
>> the life time of the application.
>> 
>> Please point out if I am in any above statements.
>> 
>> BTW, the reason of more than 200 items in the resource files is man sets of check 
>boxes and pull down lists in the
>> page. Is any way I can cut short the items in resource file?
>
>Another option is you can break your resource files into smaller chunks
>based on most-to-least used. The nvpair used 80% of the time can be
>cached and loaded at startup. you could then write a custom tag that
>first looks at the cache before getting it from the appropriate resource
>file.

Some idea. I, however, can't see how it can solve my problem. Again, not lot of data 
has been used previousely. 
Caching can't solve the problem. 

Thanks for your thought.

Vernon
>

>I hope that helps.
>
>peter
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to