I found through the log file that the render of the rhtml template would
take too much time if there exists ruby code in the rhtml files.In many
cases,these ruby code are tied with these rhtml files closely and can
not be decoupled from that,therefore,i have a question that,is there
exist some way to improve the rendering speed of rhtml when some ruby
codes are included?
Hi, what is too long and what are you trying to do? Could you provide
information about your deployment OS and any oher relevant
information?
Thanks,
-Conrad
Conrad T. wrote:
Hi, what is too long and what are you trying to do? Could you provide
information about your deployment OS and any oher relevant
information?Thanks,
-Conrad
For example,if there exists any code that involves the db operation,even
it is a very simple sentence, the rendering time will increase for about
fify times of the rhtml that does not include such ruby code.
Freddy wrote:
I found through the log file that the render of the rhtml template would
take too much time if there exists ruby code in the rhtml files.In many
cases,these ruby code are tied with these rhtml files closely and can
not be decoupled from that,therefore,i have a question that,is there
exist some way to improve the rendering speed of rhtml when some ruby
codes are included?
Have you tried erubis?
Sam Kapadia wrote:
Have you tried erubis?
yeah,it is much faster,i have tested and it costs only half time of the
original. But that means i have to change all the suffix of rhtml file
into erubis, it seems that it erubis has not been accepted by most rails
application’s deployment?
Freddy wrote:
Sam Kapadia wrote:
Have you tried erubis?
yeah,it is much faster,i have tested and it costs only half time of the
original. But that means i have to change all the suffix of rhtml file
into erubis, it seems that it erubis has not been accepted by most rails
application’s deployment?
Nope its not accepted AFAIK. But if everyone here uses it … it will be
accepted. Thats how open source project works. If speed is a concern
then you outta go with Eurubis. And its not that big of change and it
has a nice caching mechanism and it started to get popularity i.e.
various blogs etc…
Freddy,
How long are the rendering times you’re seeing? If your app was
performing ok, and you had to look at numbers in the log files to see
a problem, is there really a problem?
Pete Y.