Re: psyco

Jacob Smullyan <[email protected]>
Newsgroups gmane.comp.web.skunkweb
Message-ID <[email protected]>
On Fri, 2004-06-25 at 04:34, Pierre-Frédéric Caillaud wrote:
> 	Hello !
> 
> 	Just discovered Sckunkweb recently and myst say it's awesome.
> 	I'm doing a rather complex admin site with it and it has been quite  
> painless.
> 	So congratulations to the authors !
> 
> 	Just a question : is there a way to use Psyco to speed up component  
> rendering ?
> 
> 	Right now my pages take about 20% of the time in logic (database queries  
> and processing) and the rest in template rendering...

I recently wanted to test this, so I added to cvs an *extremely* simple
service called psyco_accel, but haven't started to play with it.  It
could be your starting point.  The service in its entirety is:

  def _hook(*args, **kwargs):
      try:
          import psyco
      except ImportError:
          pass
      else:
          psyco.profile()


  from SkunkWeb.Hooks import ChildStart
  ChildStart.append(_hook)
  del ChildStart

You would add it your list of services in sw.conf.

In simple tests I performed, this frankly didn't make difference, but
I'm not very familiar with psyco and I assume it could be targeted
better.  Please let me know what you find.

As for performance in general, generally speaking, with SkunkWeb,
component caching is the key to performance.  

Cheers,

js


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.