We made some changes to the upstreaming in Radio, adding some new scan
intervals for different folders. This reduces the load that Radio places on
the processor during each scan. Significant reductions in overall processor
usage has been seen on both Mac and PC platforms with this beta code.
*** How do I install it?
Important: Quit Radio and backup the entire Radio UserLand folder. This is
good practice before installing any beta software or tools. Also, observe
the current Radio application's processor usage while idle and while posting
before you install the beta. Ensure that upstreaming is turned on when you
check the processor usage.
On Windows 2000/XP, open the Task Manager (press Ctrl-Alt-Delete and click
the Task Manager button) or use Performance Monitor. On MacOS X, use
Activity Monitor.
1. Download this file and save it to disk:
http://lawrence.userland.com/radioParts/upstreamingBeta05.fttb
2. Import the beta parts into Radio using the Open command in
Radio's File menu.
3. In the QuickScript window (Ctrl-;), run the following script:
workspace.upstreamingBeta05.installer ()
4. The Upstreaming preferences page has been temporarily renamed "Upstream
Beta". The wording here is very different and there is no longer a
preference to set the upstreaming interval. We've hard-coded intervals to
something in line with modern weblogging--each folder type is listed on the
pref page with the scan intervals.
http://127.0.0.1:5335/system/pages/prefs?page=1.4
If you need to remove the beta parts, you can run the following command in a
QuickScript command to restore the original parts (prior to installing of
the beta parts):
workspace.upstreamingBeta05.installer (false)
*** How do I test it?
Easy. Use the software like you always have. Let us know if it behaves
like you would expect. The upstream scan intervals have changed so be sure
to visit the prefs page and look for the "Upstreaming Beta" link. Click it
and you'll see the default values and some definitions. Give us feedback on
how to make that page better and easy to understand.
Send an email to the radio-dev list letting us know that it worked, or if it
didn't work, what happened.
*** Thanks
Thanks to Marc Barrot, Andy Fragen and Patrick Ritchie for their hard work
in releasing these changes. Extra special thanks to Jake Savin for writing
the new callback for upstreaming.
*** How does it work?
We've modified radio.upstream.uploadChangedFiles to run a new callback:
radio.upstream.callbacks.upstream.upstreamScanFolder. The callback runs the
scan based on the new user prefs and sets a boolean called flScanNeeded on
the folder. The script at radio.upstream.uploadChangedFiles has a new
subroutine that looks for the boolean and scans the folder only if it's set
to true.
Developers can create similar scripts and store them (or their addresses) in
the user.radio.callbacks.upstreamScanFolder table if they create folders
that need scanning on a different schedule than once an hour, the default
value for 'custom' folders.
Also, the script at radio.file.getAttributes has been optimized to call the
date verb less often and check for the presence of a passed "whenModified"
parameter. This reduces the overall script processing time and processor
load, making upstream scans and page rendering (internal and external) much
faster.
Finally, we've corrected the upstream code so that invisible files or
folders, such as MacOS X's notorious ".DS_Store" files, never clutter the
upstream file cache.
*** Upstreaming Scan Intervals:
www Folder
Defined as: the root of the 'www' folder and the root of all category
subfolders
Interval: 10 seconds
current Folders:
Defined as: Archive folders for the past month for weblog posts (including
categories), stories and images.
Interval: 10 seconds
recent Folders:
Defined as: Archive folders for the previous month for weblog posts
(including categories), stories and images.
Interval: 5 minutes
archive Folder
Defined as: Archive folders more than two months old for weblog posts
(including categories), stories and images.
Interval: 1 day
static Folders:
Defined as: gems, images, stories folder structure
Interval: 1 minute
custom Folders:
Defined as: all folders not defined above.
Interval: 1 hour