Re: Intense CPU strain....suggestions
- From: cbmeeks <cbmeeks@xxxxxxxxx>
- Date: 31 May 2007 05:11:07 -0700
Well, you could kick off a batch job to do your resizing, then return to
the user. That way it can keep processing the images. The only thing
you'll have to handle is when the user wants to display his gallery
before it's ready.
That's exactly how I want to do it. I just don't know the best way to
execute it. I like the idea of having an XML-RPC server running but I
am concerned with security (as I should be).
So, let's say I have the following code (using CI):
....
$this->Upload->do_uploads(); // handle the actual uploading.
$this->Photos->do_resizing(); // handle the resizing
redirect('waiting');
.....
"Waiting" doesn't get kicked off until after do_resizing (sorry, new
to PHP). I'm sure there is a smarter way. I'd like to avoid pop-ups,
iframes, javascript, etc if possible.
I also thought about having the "do_resizing" simple add some records
to a db and have a program running on the server full time that checks
the db frequently. But wouldn't that be wasteful? I like the idea of
programs laying dormant until something kicks it in the pants and says
"do something!" lol
Thanks
cbmeeks
http://www.signaldev.com
.
- Follow-Ups:
- Re: Intense CPU strain....suggestions
- From: Jerry Stuckle
- Re: Intense CPU strain....suggestions
- References:
- Intense CPU strain....suggestions
- From: cbmeeks
- Re: Intense CPU strain....suggestions
- From: Geoff Berrow
- Re: Intense CPU strain....suggestions
- From: cbmeeks
- Re: Intense CPU strain....suggestions
- From: Jerry Stuckle
- Intense CPU strain....suggestions
- Prev by Date: Help with Php and Regex
- Next by Date: Variable substitution to replace switch
- Previous by thread: Re: Intense CPU strain....suggestions
- Next by thread: Re: Intense CPU strain....suggestions
- Index(es):