Re: WO5.4.x resource manager bytesForResourceNamed bottleneck
Re: WO5.4.x resource manager bytesForResourceNamed bottleneck
- Subject: Re: WO5.4.x resource manager bytesForResourceNamed bottleneck
- From: Lachlan Deck <email@hidden>
- Date: Thu, 29 Jan 2009 17:03:27 +1100
Bit more info...
I'd been filtering out com.webobjects.* ..
So this might be a WOLips problem.
The following screenshot gives a bit more info on this .. so Mike this
might be for you. Any thoughts?
The next two screenies just show the next two top hot spots:
On 29/01/2009, at 2:22 PM, Lachlan Deck wrote:
Under WO5.3.3 I had this in my abstract super-component class...
public WOElement template()
{
if ( allowsCustomTemplatingForRequestSite() )
{
WOElement template =
WOComponent.templateWithHTMLString( templateElement( "html" ),
templateElement( "wod" ), null );
if ( template != null )
{
return template;
}
}
return super.template();
}
protected String templateElement( String suffix )
{
<...>
bytes =
ishApplication
().ishResourceManager().bytesForResourceNamed( resourceName,
frameworkName(), null );
try
{
return bytes == null ? "" : new String( bytes, "UTF-8" );
}
catch ( UnsupportedEncodingException e )
{
throw new NSForwardException( "Failed to convert component bytes
to UTF-8 string", e );
}
}
This performed reasonably well. Now, however, under WO5.4
bytesForResourceNamed is a real bottleneck (it appears from
profiling). i.e., if I do
if ( false && allowsCustomTemplatingForRequestSite() ) then things
are really quick, but otherwise very very slow :-/
Any thoughts (Pierre)?? Is anyone doing anything similar with WO5.4?
Thanks.
I realise the above method (WOCOmponent.templateWithHTMLString) is
now deprecated and the underlying mechanism for this has changed
underneath (peaking on the source for WOComponent etc) but the
problem appears to be with the resource manager.
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden