From zhangyuanyi at gmail.com Sun Jan 13 12:08:09 2008 From: zhangyuanyi at gmail.com (yuanyi zhang) Date: Mon, 14 Jan 2008 01:08:09 +0800 Subject: [s3-dev] [BUG] String#underscore is outdated in Rails2.0 Message-ID: <21c563b60801130908y380310c5r265e54aeade501d4@mail.gmail.com> Hi, All I have a Rails2.0 project which requires aws/s3 in a rake file. but it causes some plugins loading incorrectly when I run a rake task. I finally found it caused by the outdated String#underscore extension in aws/s3/extension.rb. it's not updated with ActiveSupport 2.0.2, after I update it to: def underscore gsub(/::/, '/'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2'). tr("-", "_"). downcase end All go well. What do you think about this? Thanks Yuanyi Zhang From MBehan at connextions.com Thu Jan 17 13:53:14 2008 From: MBehan at connextions.com (Behan, Michael) Date: Thu, 17 Jan 2008 13:53:14 -0500 Subject: [s3-dev] Excessive slowness Message-ID: <2ADE2A5782094D43A656FEA547CB39C2065EE615@EXCHANGE.corporate.connextions.net> Hello. I am experiencing issues with speed while using this gem. Please let me know if you can replicate this. I do not understand why it is going so slow: Pick a bucket with with 30 or more files, and try this from the console: @bucket = Bucket.find('mybucket') @bucket.objects.each{|o puts o.content_type} For me, this runs extremely slow on the first run, but consecutive calls on @bucket.objects.each run instantaneously. Any ideas? Thanks -Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/amazon-s3-dev/attachments/20080117/eb1502e5/attachment.html From mdchaney at michaelchaney.com Thu Jan 17 15:13:08 2008 From: mdchaney at michaelchaney.com (Michael Chaney) Date: Thu, 17 Jan 2008 14:13:08 -0600 Subject: [s3-dev] Excessive slowness In-Reply-To: <2ADE2A5782094D43A656FEA547CB39C2065EE615@EXCHANGE.corporate.connextions.net> References: <2ADE2A5782094D43A656FEA547CB39C2065EE615@EXCHANGE.corporate.connextions.net> Message-ID: <3b456edd0801171213p2559f991q1e5f37e5fe68215a@mail.gmail.com> On 1/17/08, Behan, Michael wrote: > Hello. I am experiencing issues with speed while using this gem. Please let > me know if you can replicate this. I do not understand why it is going so > slow: > > Pick a bucket with with 30 or more files, and try this from the console: > > @bucket = Bucket.find('mybucket') > > @bucket.objects.each{|o puts o.content_type} > > For me, this runs extremely slow on the first run, but consecutive calls on > @bucket.objects.each run instantaneously. Any ideas? It has to go back to S3 for each object and run a separate request for the content type. I have some buckets with 30,000 objects, it takes a little while, even on EC2, to run audits and such. The information is cached after you hit it the first time. Michael -- Michael Darrin Chaney, Sr. mdchaney at michaelchaney.com http://www.michaelchaney.com/ From MBehan at connextions.com Thu Jan 17 16:23:52 2008 From: MBehan at connextions.com (Behan, Michael) Date: Thu, 17 Jan 2008 16:23:52 -0500 Subject: [s3-dev] Excessive slowness In-Reply-To: <3b456edd0801171213p2559f991q1e5f37e5fe68215a@mail.gmail.com> Message-ID: <2ADE2A5782094D43A656FEA547CB39C2065EE964@EXCHANGE.corporate.connextions.net> Thank you. Do you (or does anyone on this list) know a way around this? -----Original Message----- From: amazon-s3-dev-bounces at rubyforge.org [mailto:amazon-s3-dev-bounces at rubyforge.org] On Behalf Of Michael Chaney Sent: Thursday, January 17, 2008 3:13 PM To: amazon-s3-dev at rubyforge.org Subject: Re: [s3-dev] Excessive slowness On 1/17/08, Behan, Michael wrote: > Hello. I am experiencing issues with speed while using this gem. Please let > me know if you can replicate this. I do not understand why it is going so > slow: > > Pick a bucket with with 30 or more files, and try this from the console: > > @bucket = Bucket.find('mybucket') > > @bucket.objects.each{|o puts o.content_type} > > For me, this runs extremely slow on the first run, but consecutive calls on > @bucket.objects.each run instantaneously. Any ideas? It has to go back to S3 for each object and run a separate request for the content type. I have some buckets with 30,000 objects, it takes a little while, even on EC2, to run audits and such. The information is cached after you hit it the first time. Michael -- Michael Darrin Chaney, Sr. mdchaney at michaelchaney.com http://www.michaelchaney.com/ _______________________________________________ amazon-s3-dev mailing list amazon-s3-dev at rubyforge.org http://rubyforge.org/mailman/listinfo/amazon-s3-dev From wiseleyb at gmail.com Thu Jan 17 16:38:43 2008 From: wiseleyb at gmail.com (ben wiseley) Date: Thu, 17 Jan 2008 13:38:43 -0800 Subject: [s3-dev] Excessive slowness In-Reply-To: <2ADE2A5782094D43A656FEA547CB39C2065EE964@EXCHANGE.corporate.connextions.net> References: <3b456edd0801171213p2559f991q1e5f37e5fe68215a@mail.gmail.com> <2ADE2A5782094D43A656FEA547CB39C2065EE964@EXCHANGE.corporate.connextions.net> Message-ID: While this isn't very DRY I think people usually keep a table that mirrors S3 contents. For a good example of this check out attachment_fu http://khamsouk.souvanlasy.com/2007/5/1/ajax-file-uploads-in-rails-using-attachment_fu-and-responds_to_parent On Jan 17, 2008 1:23 PM, Behan, Michael wrote: > Thank you. Do you (or does anyone on this list) know a way around this? > > -----Original Message----- > From: amazon-s3-dev-bounces at rubyforge.org > [mailto:amazon-s3-dev-bounces at rubyforge.org] On Behalf Of Michael Chaney > Sent: Thursday, January 17, 2008 3:13 PM > To: amazon-s3-dev at rubyforge.org > Subject: Re: [s3-dev] Excessive slowness > > On 1/17/08, Behan, Michael wrote: > > Hello. I am experiencing issues with speed while using this gem. > Please let > > me know if you can replicate this. I do not understand why it is going > so > > slow: > > > > Pick a bucket with with 30 or more files, and try this from the > console: > > > > @bucket = Bucket.find('mybucket') > > > > @bucket.objects.each{|o puts o.content_type} > > > > For me, this runs extremely slow on the first run, but consecutive > calls on > > @bucket.objects.each run instantaneously. Any ideas? > > It has to go back to S3 for each object and run a separate request for > the content type. I have some buckets with 30,000 objects, it takes a > little while, even on EC2, to run audits and such. The information is > cached after you hit it the first time. > > Michael > -- > Michael Darrin Chaney, Sr. > mdchaney at michaelchaney.com > http://www.michaelchaney.com/ > _______________________________________________ > amazon-s3-dev mailing list > amazon-s3-dev at rubyforge.org > http://rubyforge.org/mailman/listinfo/amazon-s3-dev > _______________________________________________ > amazon-s3-dev mailing list > amazon-s3-dev at rubyforge.org > http://rubyforge.org/mailman/listinfo/amazon-s3-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/amazon-s3-dev/attachments/20080117/b5809205/attachment.html