|
List Info
Thread: invitation to the attachment_fu party!
|
|
| invitation to the attachment_fu party! |

|
2006-12-24 05:25:53 |
Hey guys, I replaced acts_as_attachment in the Asset model
with my new
modular rewrite: attachment_fu. Right now, this doesn't
mean much,
other than the fact that mephisto is a little more efficient
with the
files. For instance, instead of reading files into memory,
it just
moves it from mongrel's temp location to your site's public
directory.
But, there's a few problems right now:
- it uses a tmp/attachment_fu directory for any resized
files. I'll
probably add some code in environment.rb to create that
directory if
needed.
- Right now, it moves the files directly from Mongrel's
temp location
and retains the 600 permissions.
- Can anyone confirms that this works with fastcgi?
Besides the two
issues above, the actual uploading works fine with
mongrel/nginx.
If you don't want to join the party, just stick to the 0.7.3
branch for now.
If you're asking why I'm even bothering with this rewrite,
it's part
of my grand plan to make RMagick support obsolete. A simple
test with
uploading about 1MB of images showed the app increasing its
memory
usage from about 40MB to 90MB. This was very promptly
garbage
collected for the next action, but could cause issues for
shared hosts
that would kill it at the first spike. The same test with
ImageScience
showed the memory staying pretty stable. Feel free to dig
in,
contribute a MiniMagick processor to attachment_fu, or just
report
back results.
Have fun, happy holidays, etc.
--
Rick Olson
http://weblog.techno-
weenie.net
http://mephistoblog.com
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com
To post to this group, send email to MephistoBlog googlegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribe googlegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---
|
|
| invitation to the attachment_fu party! |

|
2006-12-24 18:02:40 |
Great job Rick.
On Dec 23, 7:25 pm, "Rick Olson"
<technowee... gmail.com> wrote:
> Hey guys, I replaced acts_as_attachment in the Asset
model with my new
> modular rewrite: attachment_fu. Right now, this
doesn't mean much,
> other than the fact that mephisto is a little more
efficient with the
> files. For instance, instead of reading files into
memory, it just
> moves it from mongrel's temp location to your site's
public directory.
>
> But, there's a few problems right now:
>
> - it uses a tmp/attachment_fu directory for any
resized files. I'll
> probably add some code in environment.rb to create that
directory if
> needed.
>
> - Right now, it moves the files directly from
Mongrel's temp location
> and retains the 600 permissions.
>
> - Can anyone confirms that this works with fastcgi?
Besides the two
> issues above, the actual uploading works fine with
mongrel/nginx.
>
> If you don't want to join the party, just stick to the
0.7.3 branch for now.
>
> If you're asking why I'm even bothering with this
rewrite, it's part
> of my grand plan to make RMagick support obsolete. A
simple test with
> uploading about 1MB of images showed the app increasing
its memory
> usage from about 40MB to 90MB. This was very promptly
garbage
> collected for the next action, but could cause issues
for shared hosts
> that would kill it at the first spike. The same test
with ImageScience
> showed the memory staying pretty stable. Feel free to
dig in,
> contribute a MiniMagick processor to attachment_fu, or
just report
> back results.
>
> Have fun, happy holidays, etc.
>
> --
> Rick Olsonhttp://weblog.techno-weenie.nethttp://mephistoblog.com
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com
To post to this group, send email to MephistoBlog googlegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribe googlegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---
|
|
| invitation to the attachment_fu party! |

|
2006-12-24 18:30:26 |
On 12/24/06, Justin Hernandez <transphorm gmail.com> wrote:
>
> Great job Rick.
Just to be clear, ImageScience isn't being used just yet.
It's only
thumbnail method doesn't let me resize to a specific width
and height.
So at the moment, there won't be much change in memory.
However, the
tmp directory is now created on initialization, and the
permissions
issue should be solved. Let me know if either of those
don't work
right. And someone, please let me know if it works on your
fastcgi
setup
--
Rick Olson
http://weblog.techno-
weenie.net
http://mephistoblog.com
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com
To post to this group, send email to MephistoBlog googlegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribe googlegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---
|
|
| invitation to the attachment_fu party! |

|
2006-12-24 19:30:36 |
On 12/24/06, Rick Olson <technoweenie gmail.com> wrote:
> And someone, please let me know if it works on your
fastcgi
> setup
Confirmed working with my Apache 1.3.x + mod_fastcgi + fcgi
setup
It properly created the _thumb and _tiny versions as well.
While it
easy very easy to guess the file names, it might be nice to
include
them in the admin UI somewhere.
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com
To post to this group, send email to MephistoBlog googlegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribe googlegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---
|
|
| invitation to the attachment_fu party! |

|
2006-12-24 22:02:09 |
Ricky I get this error message when i try to update my
database.
undefined local variable or method `acts_as_attachment' for
userhostiletemplatemigration::attachment:class
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com
To post to this group, send email to MephistoBlog googlegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribe googlegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---
|
|
| invitation to the attachment_fu party! |

|
2006-12-25 01:13:24 |
On 12/24/06, sly <schley gmail.com> wrote:
>
> Ricky I get this error message when i try to update my
database.
>
> undefined local variable or method `acts_as_attachment'
for
> userhostiletemplatemigration::attachment:class
Oh, try fixing that migration and seeing if it helps.
--
Rick Olson
http://weblog.techno-
weenie.net
http://mephistoblog.com
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com
To post to this group, send email to MephistoBlog googlegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribe googlegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---
|
|
[1-6]
|
|