Typo 4.0 and memory reduction... 4

Posted by Steve Longdo Fri, 04 Aug 2006 22:56:00 GMT

Have you upgraded to the latest Typo release only to find that it hits the per process memory limit on your host? It happened to me.

Here is how I went about reducing the memory footprint of Typo:
  • Removed sidbars that aren't used from the installation.
    • Amazon through XBox.
  • Removed unused requires from environment.rb
    • In particlular aggregation classes for the Sidebars that were removed.
  • Make sure to not load any unnecessary parts of Rails (i.e. ActiveWebService) That's right I use the admin screen to post!
  • Most importantly deleted the sparklines_textfilter.
That last one makes a huge difference in the memory use of Typo. It removes the need to load RMagick saving around ~8MB from your process size. In fact these changes have brought Typo down to about 33MB in memory. Since the average Rails app uses 30MB this isn't too bad, however memory consumption slowly creeps up over a period of days and hits the limit. Seemingly a memory leak. I will be digging into this issue as time allows, but work is keeping me busy.

I will eventually be using a diferent theme but I switched to this one while checking out memory use and haven't spent enough time on my new one yet.

Mephisto...

Posted by Steve Longdo Tue, 20 Jun 2006 04:00:00 GMT

I've been learning the ins and outs of working with Rick Olson's new Blogging/CMS Lite project, Mephisto. I've been impressed so far. Feature wise it offers a lot for as small as the code base is.

Using Liquid templates instead of rhtml is taking some getting used to. I have a close port of this Typo blog running on my laptop. I am still ironing out some kinks with interpretation of <pre> and <code> tags between Typo and Mephisto. Mainly my older posts with code included have issues. I do miss some of the sidebar functionality and I will be taking a look at adding a "feedparser section" to be able to recreate some of the sidebars in Mephisto.

Rick and company seem to have implemented caching the right way, everything just works and is fast! I can definitely see why the Rails blog decided to make the switch.

Lightbox V2 integration with Typo...

Posted by Steve Longdo Tue, 23 May 2006 11:31:00 GMT

It was brought to my attention that I didn't post a lot of detail about integrating Typo with Version 2 of lightbox. I'll attempt to correct that with a quick write up.

Start by downloading the most recent lightbox release. From here we will want to copy the images that are distributed with it into our Typo installation's public/images folder.

Next up is the javascript file and the stylesheet. I have made some slight modifications to the originals to make the image paths non-relative and the additon of links that show in the caption portion of the light box. Grab the following javascript file and put it in your public/javascripts directory. Then get the css file and put it in your public/stylesheets directory.

Final step for usage is to place a couple of lines in your active theme's layout/default.rhtml. Under the <%= page_header %> line place the following two lines:
<%= javascript_include_tag "lightbox-modded"  %>
<%= stylesheet_link_tag "/stylesheets/lightbox" %>
This should get you up and running with lone imgs
<img src="..." rel="lightbox"/>
and/or groups of imgs
<img src="..." rel="lightbox[groupName]"/>
<img src="..." rel="lightbox[groupName]"/>

Older posts: 1 2 3 4 ... 8