[typo] Typo's memory footprint

Steve Longdo steve.longdo at gmail.com
Tue Aug 1 12:36:34 EDT 2006


It is a funtion of the sidebar and textfilter controller where it
dynamically loads all files in the directories into memory:

Dir["#{RAILS_ROOT}/components/plugins/sidebars/[_a-z]*.rb"].each do |f|
  require_dependency f
end

So it is cool because when new plugins are added they automagically load up,
but unfortunate when, like Sparklines, they have a large overhead
associated.

As for knobs, you could have something that wrote a more specific regular
expression for the load instead of just [_a-z]*.rb...

On 8/1/06, Dick Davies <rasputnik at gmail.com> wrote:
>
> On 01/08/06, Steve Longdo <steve.longdo at gmail.com> wrote:
> > I have the same experience with TextDrive as Eric.  I notice that memory
> use
> > jumps 10 MB just by entering the admin console.
> >
> > I've found that removing references to Sparklines helps the memory use
> stay
> > under the threshold.  I removed the sparklines_textfilter.rb and removed
> the
> >  reference to vendor/sparklines in environment.rb.  Also removing any
> > sidebars that you don't use from the component directory helps.
>
> Just the fact of a sidebar existing bumping memory usage seems broken
> to me - is that a bug or just The Way Things Are?
>
> More generally, how hard would it be to have knobs to disable unused
> features?
>
> --
> Rasputin :: Jack of All Trades - Master of Nuns
> http://number9.hellooperator.net/
> _______________________________________________
> Typo-list mailing list
> Typo-list at rubyforge.org
> http://rubyforge.org/mailman/listinfo/typo-list
>



-- 
Thanks,
-Steve
http://www.stevelongdo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/typo-list/attachments/20060801/782d540f/attachment.html 


More information about the Typo-list mailing list