Using Webware Effectively

Here are some notes on how to use Webware to gain maximum performance:

This much easier and way more efficient than calculating these relative paths in your Servlet code. It allows you to do this:

<img src="/GlobalImages_/xx.jpg" width="XX" height="XX" />

rather than this:

<img src="${pathToRoot_}GlobalImage_/xx.jpg" width="XX" height="XX" />

Some helpful strategies are * use shortcut namebinding like this:

def __init__(self):
      self._lock = lock = Lock()
      self._lock_acquire = lock.acquire
      self._lock_release = lock.release

def doSomething(self):
      self._lock_acquire()
      ...
      self._lock_release()

-- TavisRudd - 30 Mar 2002