Displaying 20 results from an estimated 80000 matches similar to: "help on tuning rails Rendering time"
2006 Jul 13
3
Performance diff between rendering partial vs. calling a helper?
Hi,
Is there any performance difference between rendering partials vs. calling a
helper? When we initally started coding we built a bunch of small partials
and if there is a significant performance overhead with them, we''ll probably
try to switch them over to helpers. They seem like they would be quite
similar but I don''t know the full details of how partials are handled.
2006 Jan 21
3
Fragment caching with Memcached slow?
Hi,
I am trying to do fragment caching using :mem_cache_store. However, when I
compare it to fragment caching using :file_store, it seems to be a lot
slower.
Here are the results:
uncache
Completed in 2.20246 (0 reqs/sec) | Rendering: 2.19891 (99%) | DB:
0.00017(0%) | 200 OK [
http://127.0.0.1/]
using file_store
Completed in 0.00952 (105 reqs/sec) | Rendering: 0.00702 (73%) | DB:
0.00000(0%)
2007 Jul 02
3
stupid Rails rendering
I dont'' understand why it''s not possible to have a conditional
redirection in rendering
respond_to do |format|
format.js {
render :update do |page|
page.redirect_to posts_url if @located
page.replace_html ''error_message'', "Error..."
page << "$(''popup_error'').popup.show();"
2006 Jun 29
8
Is This a Performance Concern?
I''m running on a brand new MacBook Pro with a relatively clean working set.
using Mongrel in production mode on port 3000. The home page does not hit
the database and I''m getting:
Processing HomeController#index (for 127.0.0.1 at 2006-06-29 14:59:02) [GET]
Session ID: e11f7df52bffff304ca7c88e672ef71a
Parameters: {"action"=>"index",
2006 Jan 14
3
How to render from a different controller
My code is something like this.
class FirstController < ApplicationController
def foo
#some processing
render (:controller => ''second'', :action => ''index'')
end
end
I tried using both render and redirect but it seems it''s not possible to
send the control from within a controller to some other controller. Am I
missing something
2006 Apr 25
2
Bug in Rails 1.1 implementation of before_filters
I just spent a few hours tracking down a bug in Rails 1.1, so I thought
I''d post the issue and a workaround just in case anyone else hits it.
I designed a security enhancement so that controller methods can be
protected by preceding them with a role. The standard Ruby
method_added() callback is used to detect when controller methods are
added, and then I manipulate the
2007 Mar 24
2
Mongrel Performance Tuning questions
Hi all,
Starting out with load testing for one of my rails apps and am pretty
confused about what the ''best'' way to do this is. I read the tuning
article at http://mongrel.rubyforge.org/docs/how_many_mongrels.html
but am getting some weird numbers from the tests recommended at the
bottom:
httperf --server www.theserver.com --port 80 --uri /tested --num-conns
<10 second
2007 Jun 27
5
Filter Ordering in Edge Rails (Rev 7143)
Filter chaining appears to behave in differently than Rails 1.2.x. It
seems that I''m getting a lot of errors along the lines of:
ActionController::ActionControllerError: filter
#<ActionController::Filters::ClassMethods::BeforeFilterProxy:0x322f468
@filter=#<ActionController::Filters::ClassMethods::SymbolFilter:
0x322f4b8 @filter=:login_required>> was in the wrong place!
2006 Jan 14
4
hide_action doesnot hide view
The view file (eg. apps/views/items/list.rhrml) is still displayed even
when the action is hidden (hide_action :list). How can I hide view file
form being automatically displayed in this circumstance?
thanks,
jigar
--
Posted via http://www.ruby-forum.com/.
2006 Sep 22
6
Using after_filter to control rendering on actions
I have a common failure page that I may need to render to upon failing
some test that occurs in an after_filter method.
I''d like to use the after_filter to take over the control of the
rendering, like so:
def test_for_validity
some_boolean = my_test
return render(:action => ''disqualified'') unless some_boolean
@success_controller ||= controller_name
2007 Nov 08
5
Rails byte-range request support
Hi,
I''m trying to serve the iPhone a video file from my controller using
send_file. However, it appears as thought the iPhone requires byte-
range request support and rails doesn''t seem to support this.
If I give the iPhone a url that points to an actual file (i.e. it''s
served by my webserver nginx, instead of rails) it downloads and plays
it fine.
Here is the proof
2006 Aug 22
9
Article: High-Performance Ruby On Rails Setups Test...
This week we have started one new project with Ruby on Rails as primary
framework. My first task was to prepare runtime environment for it on
one of our development servers. When I have tried to research how people
doing it, I noted that there is no information about how to deploy rails
application with nginx as frontend and what is performance of such
solution. Before blindly make any
2010 Oct 20
7
How can I render a template outside of a controller in Rails 3?
Hi All,
I can''t seem to render a template outside of a controller in my Rails 3
application. The googling I''ve done has been helpful, and I eventually found
some useful info at
http://www.swombat.com/rails-rendering-templates-outside-of-a-contro.
However, this seems to be broken in Rails 3. Does anyone have any ideas how
I can fix this method or perhaps know of a better
2007 Sep 20
2
Rendering a partial from within that partial
I am having trouble rendering a partial called ''names'' through a submit
tag located within that partial. The form data is saving with my current
code. However, the existing data is not loading into the form and the
partial is not being re-rendered upon submission to reveal the changes
to this data.What might I do to fix this?
show.rhtml
<%= javascript_include_tag :defaults
2008 Jan 31
1
Layout appears three times!
Hey guys,
I am developing an application for my university and I''m having
problems with the way it''s getting rendered. I configured the main
controller to use a layout called "unet-main" and when it displays on
my local machine it works great, but when I upload it to my dedicated
server and try to view it the layout repeat itself three times
downwards.
My dedicated
2008 Feb 11
0
Regarding Implementation of n Image Rendering Web Service in Rails
Hello,
I have a number of legacy 3D and 2D rendering applications
(essentially batch applications) written in C++ that I now want to
expose as services on the Web. For example as a Facebook photo hacking
widget.
Can someone please suggest a pattern I should follow as the Rails
wrapper around my code. One of the issue is not having the app. block
on long running pixel crunching.
Cheers,
Doug
2006 Sep 01
8
Application performance
Hey all
Im working on improving the speed of my application. Ive taken on board
everything that has been said on this forum so far, im using httperf to
benchmark and try to improve performance. However, I have some question
marks over how best to go about improving performance in certain areas....
With no caching or such like deployed the application runs at an rather slow
35 - 38 req/s. A
2006 Dec 19
7
Improve the rendering speed of rhtml
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?
--
Posted via
2009 Feb 04
2
rendering error page for "Unauthorized" from before_filter
Hey all,
I am writing a plugin in which I want to stop the rendering of an
action with an unauthorized response if the user is not authorized to
view the resource. I am using a before filter to achieve this and
inside that before filter I do it like so:
render :text => "Unauthorized!", :status => :unauthorized, :layout
=> false
The status is properly set since I see the
2006 Sep 02
1
html not rendering apache/mongrel
We are running Apache and Mongrel on RHEL4 and have been experiencing
some interesting behaivor. Sometimes when someone logs into our
application (it uses the acts_as_authencticaed and acl_system2) the
following happens. Instead of the browser rendering the html and
displaying all the form elements corretly as you would expect, it simple
spews back the output without attempting to render. So