English 中文(简体)
Smarty is very slow sometimes
原标题:

We use Smarty and time to time it really takes a lot of time for it to render a template. Normally it works fine, but sometimes (like 1 random pageview out of 1 000) it takes about 5 seconds to render a template. We don t use smarty functions or plugins, just simple variables. What might be wrong, where to look? Templates are already compiled and they don t change before the slowdown .

问题回答

Maybe not exactly what you re looking for, but still an answer:

If you re only working with variables and maybe simple loops and control structures, I d recommend using another PHP-based template system. After all, PHP was designed to be a template language.

This approach has multiple positive sides:

  1. You don t have to learn yet another syntax.
  2. You lose the extra overhead of adding yet another layer on top of PHP, which in large parts duplicates what PHP can already do.




相关问题
Eclipse: Hover broken in debug perspective

Since upgrading Eclipse (Galileo build 20090920-1017), hover in debug no longer displays a variable s value. Instead, hover behaves as if I were in normal Java perspective: alt text http://...

IIS 6.0 hangs when serving a web-service

I am having issues with one of our web-services. It works fine on my development machine (win XP) whether I host it as a separate application or using cassini from Visual studio. Once I deploy on the ...

Tips for debugging a made-for-linux application on windows?

I m trying to find the source of a bug I have found in an open-source application. I have managed to get a build up and running on my Windows machine, but I m having trouble finding the spot in the ...

Asp.Net MVC - Problem returning a model to the view

I ve recently started using the Areas functionality of the Preview2 and it was working ok until I needed to return a Model to the view. Controller: public ActionResult ForgotPassword() { return ...

Unable to generate PDB files in Visual Studio 2005

For most assemblies, I m able to generate their respective .pdb files. However, I ve got one project that isn t generating their .pdb files. I ve made sure that it on debug mode and that the project ...

热门标签