• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
WO5.4.x resource manager bytesForResourceNamed bottleneck
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WO5.4.x resource manager bytesForResourceNamed bottleneck


  • Subject: WO5.4.x resource manager bytesForResourceNamed bottleneck
  • From: Lachlan Deck <email@hidden>
  • Date: Thu, 29 Jan 2009 14:22:42 +1100

Hi there,

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


  • Prev by Date: Re: [OT] EOF icon
  • Next by Date: Stable Installer Update (5661)
  • Previous by thread: Re: [OT] EOF icon
  • Next by thread: Re: WO5.4.x resource manager bytesForResourceNamed bottleneck
  • Index(es):
    • Date
    • Thread