• 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
Long response page to hide page component generation time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Long response page to hide page component generation time


  • Subject: Long response page to hide page component generation time
  • From: Paul Hoadley <email@hidden>
  • Date: Thu, 08 Jan 2015 16:49:05 +1030

Hello,

I have what we'll call a "legacy" application that generates a single page report based on a large bunch of EOs.  There's also some hairy nested subcomponents, and (simple GET) calls to a third party chart API.  In short, the page takes a long time to render, but it doesn't appear to be database bound, with profiling showing that it's spending 100% of its time in appendToResponse.  

If there was a budget to re-do this entire report the Right Way, and do the heavy lifting in some background tasks, I would do that.  But let's assume there's not (because there's not).  As a quick and dirty fix, what I want to be able to do is generate the entire HTML page content in the background, and then hand that back when it's complete.  I'm pretty close—I have a Callable that I'm sticking in a CCAjaxLongResponsePage.  I generate the report page in its call() method.  What I can't work out how to do is tell that page to "pre-render" itself.  Calling generateResponse() and appendToResponse() on the report page both work in as far as they clearly spend the rendering time I'm expecting before returning from call(), but then my IERXPerformWOActionForResult controller class hands the page back from its performAction() method, the rendering starts again from scratch on its way to the browser.  Is there a way to achieve what I want here?  (Is there a completely different idiom I've overlooked?)

Again, please suspend your disbelief that I'm doing this at all.  It's a cost-benefit issue.  I simply cannot re-write this report page properly.  I need a quick and dirty solution.


-- 
Paul Hoadley
http://logicsquad.net/


 _______________________________________________
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

  • Follow-Ups:
    • Re: Long response page to hide page component generation time
      • From: Paul Hoadley <email@hidden>
  • Prev by Date: Re: ERXCopyable's Nullify in modelCopyRelationship()
  • Next by Date: Re: Long response page to hide page component generation time
  • Previous by thread: Re: ERXCopyable's Nullify in modelCopyRelationship()
  • Next by thread: Re: Long response page to hide page component generation time
  • Index(es):
    • Date
    • Thread