Forum: Ruby on Rails Large select list, speed issues

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D9d1b31a337f46ac5e4dd56b55404f58?d=identicon&s=25 Dylan Markow (Guest)
on 2006-01-09 19:05
(Received via mailing list)
_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
B0e227ae419295321ca2aff4c27ad99d?d=identicon&s=25 Nic Werner (Guest)
on 2006-01-09 19:17
(Received via mailing list)
Did you take a look at the logs to see what SQL was being generated,
and what percentage of the time it took to create the db request,
render the page etc?

Try to narrow it down a bit.

On 1/9/06, Dylan Markow <dylan@dylanmarkow.com> wrote:
> right now. There are about 1000 projects. In PHP, the page loaded in about
>
--
- Nic
D9d1b31a337f46ac5e4dd56b55404f58?d=identicon&s=25 Dylan Markow (Guest)
on 2006-01-09 19:20
(Received via mailing list)
_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
D9d1b31a337f46ac5e4dd56b55404f58?d=identicon&s=25 Dylan Markow (Guest)
on 2006-01-09 19:53
(Received via mailing list)
_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
C9af522fc39d5de90f21119543c2b9ab?d=identicon&s=25 Steve Litt (Guest)
on 2006-01-09 20:35
(Received via mailing list)
I haven't used it yet, but maybe app/script/performance/profiler will
help you
learn what's consuming all that time.

SteveT
E555e7c34196967444a47a96395a23ab?d=identicon&s=25 Stefan Kaes (Guest)
on 2006-01-11 15:38
(Received via mailing list)
Dylan Markow wrote:

>now. There are about 1000 projects. In PHP, the page loaded in about half a
>second, the rails page takes about 4-5 seconds. I tried manually looping and
>generating option tags instead of using the select_tag method, but it wasn't
>much better. Any suggestions?
>
>
I would suggest you should try adding :select => 'id, project_name' to
your find. This way only the id and project_name will be retrieved in
your query, potentially making the instantation of your project records
a lot faster.

-- stefan

--
For rails performance tuning, see: http://railsexpress.de/blog
Subscription: http://railsexpress.de/blog/xml/rss20/feed.xml
D9d1b31a337f46ac5e4dd56b55404f58?d=identicon&s=25 Dylan Markow (Guest)
on 2006-01-12 16:57
(Received via mailing list)
_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
Eeba234182bcbd7faed9ff52e233394d?d=identicon&s=25 Douglas Livingstone (Guest)
on 2006-01-13 13:35
(Received via mailing list)
2006/1/12, Dylan Markow <dylan@dylanmarkow.com>:
>  That fixed the problem perfectly. Weird that i had a full "SELECT *" in PHP
> and it still went fast. Thanks!!
>
>

Take a look at your logs, your SELECT might not have been what you
expected it to be (perhaps someJoins you didn't want?)

Douglas
This topic is locked and can not be replied to.