space Baylys
Just practicing to pass the Turing test.
space
space
space
space
Developer for Hire!
space
addedValues Plugin
space

Home

What's new

Bayly.Root

Cornershop Plugin

Career

edutools Root

Enhancements

Interests

linguist Plugin

Manila

Patches

space

mainresponder

manilaData

manilamacros

manilaSuite

space
space

admin

backups

discuss

gems

getCanonicalSiteName

hierarchyPage

hosting

html

mail

member

members

news

plugins

prefs

referer

renderNewsPage

rpcHandlers

space
space

message

space
space

listPictures

listStories

space

shortcut

space

rpcUtils

search

sendMail

siteStructure

staticRendering

storyList

space

system

Patches by Group

Papers

Sales

Sign My Guestbook

User(land) Relations.

Contact Address

Search Baylys

urlchains

space
Join Now
Login
space space space

manilaSuite.rpcHandlers.message.listPictures

On bigger Manila websites, listing all messages in a category can "run away with the CPU" and bring the server to its knees. This is one a of a series of changes that alleviates this problem by adding a call to sys.systemTask in the tight loop.

Amended Script

on listPictures (username, password, siteName)
  «Get a struct containing info about all the pictures.
 unaltered lines omitted
 
  bundle //make sure this person is a member of the site
 
  local (adrDiscuss = manilaSuite.rpcUtils.getDiscussAddress (siteName))
  local (adrMessages = @adrDiscuss^.messages)
  local (adrSite = manilaSuite.rpcUtils.getSiteAddress (siteName))
  local (picturesCategory = manilaSuite.discuss.getPicturesCategory (adrSite))
 
  local (adrmsg, messagedata)
  new (tableType, @messagedata)
  for adrmsg in adrMessages
 unaltered lines omitted
 
  return (messagedata)

Relative to Frontier version 9.7b10