December 02, 2004 12:25 AM

Cache Experiment Yields 40 Percent Increase in Speed!

After implementing a dead, simple cache system, speed tests yielded an increase of more than 40 percent!

Basically, I focused on the slowest part of the build system, the entry plugins. More specifically those that modify the body of an entry, e.g. auto_break.sh, moods.sh. So, I started off by creating a cache directory and then modifying the read_entry function to compare files in both the cache and data directories. I was particularly interested in isolating the variable, NB_EntryBody. To do this in a flexible manner, I created a new plugins directory, entry/body and moved all entry plugins that modified NB_EntryBody to there. The beauty of this system, is that it finally solves some of the redundancy that's been bothering me for so long. With the new cache system in place, the entries content only gets processed once, every other time it's just read in from the cached version. Because of this, even the first test run was considerably faster than those without the cache and the second run was of course even faster. I think I'll keep her! :D


Posted by n1xt3r | Permanent link | File under: developer-notes | Comments: (0)

0 comments

Comments are closed

If you really, really want to comment, please mail n1xt3r@fastmail.fm