Hi there.

I have serious trouble using the i18n framework of recent turbogears
version. I develop a multi-language site. After a fresh start the
server responds reasonably fast; but after a handful requests starts to
slow down until request take 10s or longer (if they ever complete at
all).

This is unbearable.

What I do is the following. According to the docs I store the key
'locale' in the session (requiring a cookie on the client. Is there a
way to use urls like en/... de/... fr/... with the way turbogears maps
urls?). I also turn on i18n.runTemplateFilter, so constant strings in
my templates get translated.

I also store the the locale in the tg dictionary for kid. Also in the
templates I use _() in attributes.

The error messages vary, but the most frightening is the following.
(the method that appears is somewhat random. I also see this with the
rss feed)

<----------------- SNIP ----------------->
29/Apr/2006:11:04:51 HTTP INFO Page handler: <bound method
News.teilnehmen of <broenner.controllers.News object at 0x40bc
3aec>>
Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0-py2.4.egg/cherrypy/_cphttptools.py",
line 106, in _run
    self.main()
  File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0-py2.4.egg/cherrypy/_cphttptools.py",
line 255, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in teilnehmen
  File "/home/igor/turbogears/0.9a4/turbogears/controllers.py", line
211, in expose
    output = database.run_with_transaction(expose._expose,func, accept,
allow_json, allow_json_from_config,*args, **kw)
  File "/home/igor/turbogears/0.9a4/turbogears/database.py", line 216,
in run_with_transaction
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File "/home/igor/turbogears/0.9a4/turbogears/controllers.py", line
232, in <lambda>
    expose._expose.when(rule)(lambda _func, accept, allow_json,
allow_json_from_config,*args,**kw: _execute_func(
  File "/home/igor/turbogears/0.9a4/turbogears/controllers.py", line
265, in _execute_func
    return _process_output(output, template, format, content_type,
mapping, fragment)
  File "/home/igor/turbogears/0.9a4/turbogears/controllers.py", line
56, in _process_output
    mapping=mapping, content_type=content_type,fragment=fragment)
  File "/home/igor/turbogears/0.9a4/turbogears/view/base.py", line 131,
in render
    return engine.render(**kw)
  File
"/usr/lib/python2.4/site-packages/TurboKid-0.9.3-py2.4.egg/turbokid/kidsupport.py",
line 154, in render
    return t.serialize(encoding=self.defaultencoding, output=format,
fragment=fragment)
  File
"/usr/lib/python2.4/site-packages/kid-0.9-py2.4.egg/kid/__init__.py",
line 236, in serialize
    return serializer.serialize(self, encoding, fragment)
  File
"/usr/lib/python2.4/site-packages/kid-0.9-py2.4.egg/kid/serialization.py",
line 51, in serialize
    text = list(self.generate(stream, encoding, fragment))
  File
"/usr/lib/python2.4/site-packages/kid-0.9-py2.4.egg/kid/serialization.py",
line 327, in generate
    for ev, item in self.apply_filters(stream):
  File
"/usr/lib/python2.4/site-packages/kid-0.9-py2.4.egg/kid/serialization.py",
line 84, in balancing_filter
    for ev, item in stream:
  File
"/usr/lib/python2.4/site-packages/kid-0.9-py2.4.egg/kid/pull.py", line
206, in _coalesce
    for ev, item in stream:
  File "/home/igor/turbogears/0.9a4/turbogears/i18n/kidutils.py", line
60, in i18n_filter
....
....

 File "/home/igor/turbogears/0.9a4/turbogears/i18n/kidutils.py", line
60, in i18n_filter
    for ev, item in stream:
  File "/home/igor/turbogears/0.9a4/turbogears/i18n/kidutils.py", line
57, in i18n_filter
    lang_attr = turbogears.config.get("i18n.templateLocaleAttribute",
"lang")
  File "/home/igor/turbogears/0.9a4/turbogears/config.py", line 51, in
get
    return config.get(key, default_value, return_section, path)
  File
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0-py2.4.egg/cherrypy/config.py",
line 115, in get
    path = cherrypy.request.object_path
RuntimeError: maximum recursion depth exceeded
<------------------SNAP---------------->

I tried moving to postgres, storing sessions in Ram or Files, using
implicit or explicit locking and upgrading cherrypy and sqlobject to
their latest version. I also tried the trunk as of today to no avail.

Any ideas?

Igor


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk
-~----------~----~----~----~------~----~------~--~---

Reply via email to