I have a bunch of pages that can take a long time to generate. I'd like to show a WOLongResponsePage in the interim. The typical way of using WOLongResponsePage is to run the business logic or whatever is taking a long time in a different thread (kicked off by WOLongResponsePage.performAction()), and once done, generate the final page with the result of that expensive computation (with WOLongResponsePage.pageForResult(Object)).

Unfortunately, the pages I have to deal with can't be used with this pattern. They're slow because they contain thousands of bindings which each are partly responsible for the slowness. Getting all the values upfront at once would require me to rewrite the pages - something I don't have time for.

So what I'd like to do instead is (simplified):
  WOLongResponsePage.performAction() {
      slowPage.generateResponse();

I think I've figured out how to do WOLongResponsePage.pageForResult (the slow pages are basically display-only). My problem is calling generateResponse() from a new thread. Some bindings on the slow pages are hooked up to the session, and to objects in the session's defaultEditingContext causing all sort of issues that I'm having troubles tracking down. So, has anyone ever done this sort of thing and could give me any advice?


Thanks,
Christian

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to